summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/atomic.h
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2002-02-28 06:17:05 +0000
committerbmilekic <bmilekic@FreeBSD.org>2002-02-28 06:17:05 +0000
commita3cf10660c5fb5fe135e59dc9e4a31342a05e77b (patch)
tree352ab401e12f9ba2f156ebfbd818547d14aa62e3 /sys/amd64/include/atomic.h
parente793101d12bd318506950dec86d2f89ed0c8ccab (diff)
downloadFreeBSD-src-a3cf10660c5fb5fe135e59dc9e4a31342a05e77b.zip
FreeBSD-src-a3cf10660c5fb5fe135e59dc9e4a31342a05e77b.tar.gz
Make MPLOCKED work again in asm files and stringify it explicitly
where necessary. Reviewed by: jake
Diffstat (limited to 'sys/amd64/include/atomic.h')
-rw-r--r--sys/amd64/include/atomic.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h
index 157f857..42b3f3e 100644
--- a/sys/amd64/include/atomic.h
+++ b/sys/amd64/include/atomic.h
@@ -80,7 +80,7 @@ void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v);
* the binaries will run on both types of systems.
*/
#if defined(SMP) || !defined(_KERNEL)
-#define MPLOCKED "lock ; "
+#define MPLOCKED lock ;
#else
#define MPLOCKED
#endif
@@ -93,7 +93,7 @@ void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v);
static __inline void \
atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\
{ \
- __asm __volatile(MPLOCKED OP \
+ __asm __volatile(__XSTRING(MPLOCKED) OP \
: "+m" (*p) \
: CONS (V)); \
}
@@ -137,7 +137,7 @@ atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src)
int res = exp;
__asm __volatile (
- " " MPLOCKED " "
+ " " __XSTRING(MPLOCKED) " "
" cmpxchgl %1,%2 ; "
" setz %%al ; "
" movzbl %%al,%0 ; "
@@ -180,7 +180,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \
{ \
u_##TYPE res; \
\
- __asm __volatile(MPLOCKED LOP \
+ __asm __volatile(__XSTRING(MPLOCKED) LOP \
: "=a" (res), /* 0 (result) */\
"+m" (*p) /* 1 */ \
: : "memory"); \
OpenPOWER on IntegriCloud