FreeBSD/sys/powerpc/powerpc/trap.c
/*
 * Handles a fatal fault when we have onfault state to recover.  Returns
 * non-zero if there was onfault recovery state available.
 */
Handles a fatal fault when we have onfault state to recover.  Returns
non-zero if there was onfault recovery state available.
Handles a fatal fault when we have onfault state to recover . Returns non - zero if there was onfault recovery state available .
static int
handle_onfault(struct trapframe *frame)
{
	struct		thread *td;
	jmp_buf		*fb;
	td = curthread;
	fb = td->td_pcb->pcb_onfault;
	if (fb != NULL) {
		frame->srr0 = (*fb)->_jb[FAULTBUF_LR];
		frame->fixreg[1] = (*fb)->_jb[FAULTBUF_R1];
		frame->fixreg[2] = (*fb)->_jb[FAULTBUF_R2];
		frame->fixreg[3] = 1;
		frame->cr = (*fb)->_jb[FAULTBUF_CR];
		bcopy(&(*fb)->_jb[FAULTBUF_R14], &frame->fixreg[14],
		    18 * sizeof(register_t));
		td->td_pcb->pcb_onfault = NULL; 
		return (1);
	}
	return (0);
}
static int handle_onfault ( struct trapframe * frame ) { struct thread * td ; jmp_buf * fb ; td = curthread ; fb = td -> td_pcb -> pcb_onfault ; if ( fb != NULL ) { frame -> srr0 = ( * fb ) -> _jb [ FAULTBUF_LR ] ; frame -> fixreg [ 1 ] = ( * fb ) -> _jb [ FAULTBUF_R1 ] ; frame -> fixreg [ 2 ] = ( * fb ) -> _jb [ FAULTBUF_R2 ] ; frame -> fixreg [ 3 ] = 1 ; frame -> cr = ( * fb ) -> _jb [ FAULTBUF_CR ] ; bcopy ( & ( * fb ) -> _jb [ FAULTBUF_R14 ] , & frame -> fixreg [ 14 ] , 18 * sizeof ( register_t ) ) ; td -> td_pcb -> pcb_onfault = NULL ; return ( 1 ) ; } return ( 0 ) ; }
Handles a fatal fault when we have onfault state to recover.
Handles a fatal fault when we have onfault state to recover .
/* Returns twice, not thrice */