- NetBSD Manual Pages
CURPROC(9) NetBSD Kernel Developer's Manual CURPROC(9)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
curproc, curcpu, curlwp -- current process, processor, and LWP
struct cpu_info *
struct proc *
struct lwp *
The following macros can be used to retrieve the current processor,
process, and light-weight process (LWP), respectively:
1. The machine-dependent curcpu() macro returns a pointer to a
cpu_info structure containing information of the CPU that this
thread is running on.
2. The machine-independent curproc() macro refers to a pointer to
the process currently running on this CPU.
3. The curlwp() macro expands to a pointer to lwp structure, con-
taining information about the current LWP. This macro is
machine-independent, but machine-dependent <machine/cpu.h> may
NetBSD 9.99 July 1, 2010 NetBSD 9.99