From 7849b49a608a84c080c7eec4030810f652446984 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Tue, 26 Apr 2005 13:15:49 +0000 Subject: [PATCH] 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 --- sys/sys/pcpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h index ef0505293f0b..97ab2cf3624c 100644 --- a/sys/sys/pcpu.h +++ b/sys/sys/pcpu.h @@ -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)