INSIST(atomic_load("a->used) == 0);
INSIST(atomic_load("a->waiting) == 0);
INSIST(ISC_LIST_EMPTY(quota->cbs));
- atomic_store_release("a->max, 0);
+ atomic_store_relaxed("a->max, 0);
atomic_store_release("a->used, 0);
- atomic_store_release("a->soft, 0);
+ atomic_store_relaxed("a->soft, 0);
isc_mutex_destroy("a->cblock);
}
void
isc_quota_soft(isc_quota_t *quota, unsigned int soft) {
REQUIRE(VALID_QUOTA(quota));
- atomic_store_release("a->soft, soft);
+ atomic_store_relaxed("a->soft, soft);
}
void
isc_quota_max(isc_quota_t *quota, unsigned int max) {
REQUIRE(VALID_QUOTA(quota));
- atomic_store_release("a->max, max);
+ atomic_store_relaxed("a->max, max);
}
unsigned int
static isc_result_t
quota_reserve(isc_quota_t *quota) {
isc_result_t result;
- uint_fast32_t max = atomic_load_acquire("a->max);
- uint_fast32_t soft = atomic_load_acquire("a->soft);
+ uint_fast32_t max = atomic_load_relaxed("a->max);
+ uint_fast32_t soft = atomic_load_relaxed("a->soft);
uint_fast32_t used = atomic_load_acquire("a->used);
do {
if (max != 0 && used >= max) {