summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/cpu.h
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
committerjake <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
commit4f5d8ed82579a945555b585b43ab2d09eae30c77 (patch)
tree512839f19fc02786cc9904c4406357f3573a8b09 /sys/amd64/include/cpu.h
parent776ef1f43089579877329277af83423976a699d2 (diff)
downloadFreeBSD-src-4f5d8ed82579a945555b585b43ab2d09eae30c77.zip
FreeBSD-src-4f5d8ed82579a945555b585b43ab2d09eae30c77.tar.gz
Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
Diffstat (limited to 'sys/amd64/include/cpu.h')
-rw-r--r--sys/amd64/include/cpu.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h
index 4c6cb43..6c4162b 100644
--- a/sys/amd64/include/cpu.h
+++ b/sys/amd64/include/cpu.h
@@ -62,7 +62,7 @@
#define CLKF_USERMODE(framep) \
((ISPL((framep)->cf_cs) == SEL_UPL) || (framep->cf_eflags & PSL_VM))
-#define CLKF_INTR(framep) (intr_nesting_level >= 2)
+#define CLKF_INTR(framep) (PCPU_GET(intr_nesting_level) >= 2)
#define CLKF_PC(framep) ((framep)->cf_eip)
/*
@@ -82,7 +82,7 @@
#define need_resched() do { \
PCPU_SET(astpending, AST_RESCHED|AST_PENDING); \
} while (0)
-#define resched_wanted() (astpending & AST_RESCHED)
+#define resched_wanted() (PCPU_GET(astpending) & AST_RESCHED)
/*
* Arrange to handle pending profiling ticks before returning to user mode.
@@ -105,7 +105,7 @@
*/
#define signotify(p) aston()
#define aston() do { \
- PCPU_SET(astpending, astpending | AST_PENDING); \
+ PCPU_SET(astpending, PCPU_GET(astpending) | AST_PENDING); \
} while (0)
#define astoff()
OpenPOWER on IntegriCloud