mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add membar_sync
Provides the missing full barrier variant to the membar primitive set. While not used right now, this is probably going to change down the road. Name taken from Solaris, to follow the existing routines. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Closes #13907
This commit is contained in:
@@ -59,6 +59,7 @@ extern uint64_t atomic_cas_64(volatile uint64_t *target, uint64_t cmp,
|
||||
|
||||
#define membar_consumer() atomic_thread_fence_acq()
|
||||
#define membar_producer() atomic_thread_fence_rel()
|
||||
#define membar_sync() atomic_thread_fence_seq_cst()
|
||||
|
||||
static __inline uint32_t
|
||||
atomic_add_32_nv(volatile uint32_t *target, int32_t delta)
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
#define membar_consumer() smp_rmb()
|
||||
#define membar_producer() smp_wmb()
|
||||
#define membar_sync() smp_mb()
|
||||
|
||||
#define physmem zfs_totalram_pages
|
||||
|
||||
|
||||
Reference in New Issue
Block a user