diff --git a/lib/isc/include/isc/refcount.h b/lib/isc/include/isc/refcount.h index 6b1f7cdece..40544d941d 100644 --- a/lib/isc/include/isc/refcount.h +++ b/lib/isc/include/isc/refcount.h @@ -79,7 +79,7 @@ isc_refcount_increment0(isc_refcount_t *target) { #define isc_refcount_increment0(target) \ ({ \ uint_fast32_t __v; \ - __v = atomic_fetch_add_relaxed(target, 1); \ + __v = atomic_fetch_add_release(target, 1); \ INSIST(__v < UINT32_MAX); \ __v; \ }) @@ -102,7 +102,7 @@ isc_refcount_increment(isc_refcount_t *target) { #define isc_refcount_increment(target) \ ({ \ uint_fast32_t __v; \ - __v = atomic_fetch_add_relaxed(target, 1); \ + __v = atomic_fetch_add_release(target, 1); \ INSIST(__v > 0 && __v < UINT32_MAX); \ __v; \ })