FreeBSD/sys/i386/i386/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_esi = (int) func;	
	td->td_pcb->pcb_ebx = (int) arg;	
}
void cpu_fork_kthread_handler ( struct thread * td , void ( * func ) ( void * ) , void * arg ) { td -> td_pcb -> pcb_esi = ( int ) func ; td -> td_pcb -> pcb_ebx = ( int ) 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 .
/*
	 * Note that the trap frame follows the args, so the function
	 * is really called like this:  func(arg, frame);
	 */ /* function */ /* first arg */