summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2006-12-29 13:36:26 +0000
committerbde <bde@FreeBSD.org>2006-12-29 13:36:26 +0000
commit6a28e42eadcd4634375ae8043202f375212bd6cb (patch)
tree07398fdf4305b1c3e5a94f5dd3f5215398864320 /sys/i386
parentcbd305868f05bdc421a600acb8319cc20d782f11 (diff)
downloadFreeBSD-src-6a28e42eadcd4634375ae8043202f375212bd6cb.zip
FreeBSD-src-6a28e42eadcd4634375ae8043202f375212bd6cb.tar.gz
Try harder to garbage-collect the "LOCORE" (really asm) version of
MPLOCKED. The cleaning in rev.1.25 was supposed to have been undone by rev.1.26, but 1.26 could never have actually affected asm files since atomic.h is full of C declarations so including it in asm files would just give syntax errors. The asm MPLOCKED is even less needed than when misplaced definitions of it were first removed, and is now unused in any asm file in the src tree except in anachronismns in sys/i386/i386/support.s.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/include/atomic.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/i386/include/atomic.h b/sys/i386/include/atomic.h
index b22a543..7100ced 100644
--- a/sys/i386/include/atomic.h
+++ b/sys/i386/include/atomic.h
@@ -85,7 +85,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
@@ -98,7 +98,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(__XSTRING(MPLOCKED) OP \
+ __asm __volatile(MPLOCKED OP \
: "=m" (*p) \
: CONS (V), "m" (*p)); \
} \
@@ -147,7 +147,7 @@ atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src)
u_char res;
__asm __volatile (
- " " __XSTRING(MPLOCKED) " "
+ " " MPLOCKED " "
" cmpxchgl %2,%1 ; "
" sete %0 ; "
"1: "
@@ -173,7 +173,7 @@ atomic_fetchadd_int(volatile u_int *p, u_int v)
{
__asm __volatile (
- " " __XSTRING(MPLOCKED) " "
+ " " MPLOCKED " "
" xaddl %0, %1 ; "
"# atomic_fetchadd_int"
: "+r" (v), /* 0 (result) */
@@ -214,7 +214,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \
{ \
u_##TYPE res; \
\
- __asm __volatile(__XSTRING(MPLOCKED) LOP \
+ __asm __volatile(MPLOCKED LOP \
: "=a" (res), /* 0 (result) */\
"=m" (*p) /* 1 */ \
: "m" (*p) /* 2 */ \
OpenPOWER on IntegriCloud