diff options
author | alc <alc@FreeBSD.org> | 2007-03-11 05:54:29 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2007-03-11 05:54:29 +0000 |
commit | b03ddb707bfa75419cca3c62c43a52a0e43e11fe (patch) | |
tree | c82f4d045af3dd306e3ada863f05a02bf267342a /sys/arm | |
parent | be15acebb297e61c62592db36b982bda336df47f (diff) | |
download | FreeBSD-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/arm')
-rw-r--r-- | sys/arm/include/pcpu.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/arm/include/pcpu.h b/sys/arm/include/pcpu.h index 1bf754e..82d9066 100644 --- a/sys/arm/include/pcpu.h +++ b/sys/arm/include/pcpu.h @@ -52,6 +52,12 @@ extern struct pcpu *pcpup; extern struct pcpu __pcpu; #define PCPU_GET(member) (__pcpu.pc_ ## member) + +/* + * XXX The implementation of this operation should be made atomic + * with respect to preemption. + */ +#define PCPU_LAZY_INC(member) (++__pcpu.pc_ ## member) #define PCPU_PTR(member) (&__pcpu.pc_ ## member) #define PCPU_SET(member,value) (__pcpu.pc_ ## member = (value)) |