MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cpu_fork_kthread_handler

Function cpu_fork_kthread_handler

freebsd/arm/arm/vm_machdep.c:284–289  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

282 * This is needed to make kernel threads stay in kernel mode.
283 */
284void
285cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg)
286{
287 td->td_pcb->pcb_regs.sf_r4 = (register_t)func; /* function */
288 td->td_pcb->pcb_regs.sf_r5 = (register_t)arg; /* first arg */
289}
290
291/*
292 * Software interrupt handler for queued VM system processing.

Callers 3

create_initFunction · 0.50
kproc_createFunction · 0.50
kthread_addFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected