Manual browser: curcpu(9)
|CURPROC(9)||Kernel Developer's Manual||CURPROC(9)|
NAMEcurproc, curcpu, curlwp — current process, processor, and LWP
struct cpu_info *
struct proc *
struct lwp *
DESCRIPTIONThe following macros can be used to retrieve the current processor, process, and light-weight process (LWP), respectively:
- The machine-dependent curcpu() macro returns a pointer to a cpu_info structure containing information of the CPU that this thread is running on.
- The machine-independent curproc() macro refers to a pointer to the process currently running on this CPU.
- The 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 7.0|