CURPROC(9) | Kernel Developer's Manual | CURPROC(9) |
curproc
, curcpu
,
curlwp
—
#include <sys/proc.h>
struct cpu_info *
curcpu
(void);
struct proc *
curproc
(void);
struct lwp *
curlwp
(void);
curcpu
() macro returns a
pointer to a cpu_info structure containing information
of the CPU that this thread is running on.curproc
() macro refers to
a pointer to the process currently running on this CPU.curlwp
() macro expands to a pointer to
lwp structure, containing information about the current
LWP. This macro is machine-independent, but machine-dependent
<machine/cpu.h>
may
redefine it.July 1, 2010 | NetBSD 9.0 |