summaryrefslogtreecommitdiff
path: root/include/atomic
diff options
context:
space:
mode:
Diffstat (limited to 'include/atomic')
-rw-r--r--include/atomic/rwlock.h2
-rw-r--r--include/atomic/x86-gcc.h2
-rw-r--r--include/atomic/x86-msvc.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/include/atomic/rwlock.h b/include/atomic/rwlock.h
index 3d8edb9e27e..5a3ca5a434e 100644
--- a/include/atomic/rwlock.h
+++ b/include/atomic/rwlock.h
@@ -47,7 +47,7 @@ typedef struct {pthread_mutex_t rw;} my_atomic_rwlock_t;
#endif
#define make_atomic_add_body(S) int ## S sav; sav= *a; *a+= v; v=sav;
-#define make_atomic_swap_body(S) int ## S sav; sav= *a; *a= v; v=sav;
+#define make_atomic_fas_body(S) int ## S sav; sav= *a; *a= v; v=sav;
#define make_atomic_cas_body(S) if ((ret= (*a == *cmp))) *a= set; else *cmp=*a;
#define make_atomic_load_body(S) ret= *a;
#define make_atomic_store_body(S) *a= v;
diff --git a/include/atomic/x86-gcc.h b/include/atomic/x86-gcc.h
index 0be8fdf9244..cd84faeee31 100644
--- a/include/atomic/x86-gcc.h
+++ b/include/atomic/x86-gcc.h
@@ -43,7 +43,7 @@
#define make_atomic_add_body(S) \
asm volatile (LOCK_prefix "; xadd %0, %1;" : "+r" (v) , "+m" (*a))
#endif
-#define make_atomic_swap_body(S) \
+#define make_atomic_fas_body(S) \
asm volatile ("xchg %0, %1;" : "+r" (v) , "+m" (*a))
#define make_atomic_cas_body(S) \
asm volatile (LOCK_prefix "; cmpxchg %3, %0; setz %2;" \
diff --git a/include/atomic/x86-msvc.h b/include/atomic/x86-msvc.h
index 8f3e55aaed7..bd5a7fdd96c 100644
--- a/include/atomic/x86-msvc.h
+++ b/include/atomic/x86-msvc.h
@@ -43,7 +43,7 @@
_asm setz al \
_asm movzx ret, al \
}
-#define make_atomic_swap_body(S) \
+#define make_atomic_fas_body(S) \
_asm { \
_asm mov reg_ ## S, v \
_asm xchg *a, reg_ ## S \