unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (NetBSD-2.0)
Page:
Section:
Apropos / Subsearch:
optional field

CPU_EXIT(9)              BSD Kernel Developer's Manual             CPU_EXIT(9)

NAME
     cpu_exit -- machine-dependent process exit

SYNOPSIS
     #include <&lt;sys/systm.h>&gt;

     void
     cpu_exit(struct lwp *l, int is_process);

DESCRIPTION
     cpu_exit() is machine-dependent code invoked by exit1() or lwp_exit() as
     the last action during process or lwp exit to switch to a new context
     (possibly the idle context).  cpu_exit() will clean up machine-dependent
     process state.  If is_process is 0, we're exiting an lwp.  In that case,
     cpu_exit() only does lwp-appropriate cleanup.  cpu_exit() will then
     invoke exit2() or lwp_exit2() to schedule the old lwp's u-area and stack
     to be released by the reaper thread.  cpu_exit() will then invoke an
     equivalent of cpu_switch() to wait for another process to wake up.

CODE REFERENCES
     This section describes places within the NetBSD source tree where actual
     code using cpu_exit() be found.  All pathnames are relative to /usr/src.

     exit1() and exit2() can be found within the file sys/kern/kern_exit.c.

     lwp_exit() and lwp_exit2() can be found within the file
     sys/kern/kern_lwp.c.

SEE ALSO
     cpu_switch(9)

BSD                             August 23, 2003                            BSD