summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-03-11 05:54:29 +0000
committeralc <alc@FreeBSD.org>2007-03-11 05:54:29 +0000
commitb03ddb707bfa75419cca3c62c43a52a0e43e11fe (patch)
treec82f4d045af3dd306e3ada863f05a02bf267342a /sys/ia64
parentbe15acebb297e61c62592db36b982bda336df47f (diff)
downloadFreeBSD-src-b03ddb707bfa75419cca3c62c43a52a0e43e11fe.zip
FreeBSD-src-b03ddb707bfa75419cca3c62c43a52a0e43e11fe.tar.gz
Push down the implementation of PCPU_LAZY_INC() into the machine-dependent
header file. Reimplement PCPU_LAZY_INC() on amd64 and i386 making it atomic with respect to interrupts. Reviewed by: bde, jhb
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/include/pcpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/ia64/include/pcpu.h b/sys/ia64/include/pcpu.h
index c7bf793..dfe31ef 100644
--- a/sys/ia64/include/pcpu.h
+++ b/sys/ia64/include/pcpu.h
@@ -48,6 +48,12 @@ struct pcpu;
register struct pcpu *pcpup __asm__("r13");
#define PCPU_GET(member) (pcpup->pc_ ## member)
+
+/*
+ * XXX The implementation of this operation should be made atomic
+ * with respect to preemption.
+ */
+#define PCPU_LAZY_INC(member) (++pcpup->pc_ ## member)
#define PCPU_PTR(member) (&pcpup->pc_ ## member)
#define PCPU_SET(member,value) (pcpup->pc_ ## member = (value))
OpenPOWER on IntegriCloud