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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145544

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)