Add 'curcpu', a shortcut to the current CPU ID, similar to curthread,
curproc, et al. Useful for indexing into per-CPU data structures. MFC after: 2 weeks
This commit is contained in:
parent
0080ee9897
commit
7849b49a60
@ -81,6 +81,7 @@ SLIST_HEAD(cpuhead, pcpu);
|
||||
extern struct cpuhead cpuhead;
|
||||
|
||||
#define CURPROC (curthread->td_proc)
|
||||
#define curcpu PCPU_GET(cpuid)
|
||||
#define curkse (curthread->td_kse)
|
||||
#define curksegrp (curthread->td_ksegrp)
|
||||
#define curproc (curthread->td_proc)
|
||||
|
Loading…
Reference in New Issue
Block a user