- Use the SMP style ops for atomic_load/store() in userland so that

libraries and binaries will work on both UP and SMP machines.
- Remove unnecessary gcc memory barrier from the UP atomic_store() op.

Submitted by:	bde
This commit is contained in:
jhb 2004-11-12 18:40:22 +00:00
parent dcb9e13761
commit ba0a3a16d6

View File

@ -172,7 +172,7 @@ atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src)
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
#if !defined(SMP)
#if defined(KERNEL) && !defined(SMP)
/*
* We assume that a = b will do atomic loads and stores. However, on a
@ -191,7 +191,6 @@ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \
static __inline void \
atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\
{ \
__asm __volatile("" : : : "memory"); \
*p = v; \
} \
struct __hack