FreeBSD/sys/arm/arm/vm_machdep.c
/*
 * Intercept the return address from a freshly forked process that has NOT
 * been scheduled yet.
 *
 * This is needed to make kernel threads stay in kernel mode.
 */
Intercept the return address from a freshly forked process that has NOT
been scheduled yet.

This is needed to make kernel threads stay in kernel mode.
Intercept the return address from a freshly forked process that has NOT been scheduled yet . This is needed to make kernel threads stay in kernel mode .
void
cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg)
{
	td->td_pcb->pcb_regs.sf_r4 = (register_t)func;	
	td->td_pcb->pcb_regs.sf_r5 = (register_t)arg;	
}
void cpu_fork_kthread_handler ( struct thread * td , void ( * func ) ( void * ) , void * arg ) { td -> td_pcb -> pcb_regs . sf_r4 = ( register_t ) func ; td -> td_pcb -> pcb_regs . sf_r5 = ( register_t ) arg ; }
Intercept the return address from a freshly forked process that has NOT
 been scheduled yet.
Intercept the return address from a freshly forked process that has NOT been scheduled yet .
/* function */ /* first arg */