- 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:
parent
dcb9e13761
commit
ba0a3a16d6
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user