Add a comment about too strong semantic of atomic_load_acq() on x86.

Submitted by:	bde
MFC after:	2 weeks
This commit is contained in:
kib 2015-06-29 09:58:40 +00:00
parent e85612a06d
commit f6cfae6dab
2 changed files with 18 additions and 0 deletions

View File

@ -296,6 +296,15 @@ __storeload_barrier(void)
}
#endif /* _KERNEL*/
/*
* C11-standard acq/rel semantics only apply when the variable in the
* call is the same for acq as it is for rel. However, our previous
* (x86) implementations provided much stronger ordering than required
* (essentially what is called seq_cst order in C11). This
* implementation provides the historical strong ordering since some
* callers depend on it.
*/
#define ATOMIC_LOAD(TYPE) \
static __inline u_##TYPE \
atomic_load_acq_##TYPE(volatile u_##TYPE *p) \

View File

@ -278,6 +278,15 @@ __storeload_barrier(void)
}
#endif /* _KERNEL*/
/*
* C11-standard acq/rel semantics only apply when the variable in the
* call is the same for acq as it is for rel. However, our previous
* (x86) implementations provided much stronger ordering than required
* (essentially what is called seq_cst order in C11). This
* implementation provides the historical strong ordering since some
* callers depend on it.
*/
#define ATOMIC_LOAD(TYPE) \
static __inline u_##TYPE \
atomic_load_acq_##TYPE(volatile u_##TYPE *p) \