summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-04-26 13:15:49 +0000
committerrwatson <rwatson@FreeBSD.org>2005-04-26 13:15:49 +0000
commitd465b82a7cbc1ed36ac41fae336caa8f18963ae1 (patch)
tree858adf8b0c13f17d32a8609e3b90cfdbc7fc0d19 /sys
parent5745532ed145455c2f9fde24a0ca7f2fb86d23fb (diff)
downloadFreeBSD-src-d465b82a7cbc1ed36ac41fae336caa8f18963ae1.zip
FreeBSD-src-d465b82a7cbc1ed36ac41fae336caa8f18963ae1.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/pcpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h
index ef05052..97ab2cf 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)
OpenPOWER on IntegriCloud