Index: sys/sys/refcount.h =================================================================== --- sys/sys/refcount.h +++ sys/sys/refcount.h @@ -52,7 +52,7 @@ { KASSERT(*count < UINT_MAX, ("refcount %p overflowed", count)); - atomic_add_int(count, 1); + atomic_add_acq_int(count, 1); } static __inline int @@ -88,7 +88,7 @@ for (;;) { if (old == 0) return (0); - if (atomic_fcmpset_int(count, &old, old + 1)) + if (atomic_fcmpset_acq_int(count, &old, old + 1)) return (1); } } @@ -102,7 +102,7 @@ for (;;) { if (old == 1) return (0); - if (atomic_fcmpset_int(count, &old, old - 1)) + if (atomic_fcmpset_rel_int(count, &old, old - 1)) return (1); } }