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:
Robert Watson 2005-04-26 13:15:49 +00:00
parent 0080ee9897
commit 7849b49a60

View File

@ -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)