From: Olivier Houchard Date: Fri, 8 Mar 2019 17:49:24 +0000 (+0100) Subject: MEDIUM: cache: Use the new _HA_ATOMIC_* macros. X-Git-Tag: v2.0-dev2~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa090d46fef7abae5cd28c9f368c7e80db3018f6;p=thirdparty%2Fhaproxy.git MEDIUM: cache: Use the new _HA_ATOMIC_* macros. Use the new _HA_ATOMIC_* macros and add barriers where needed. --- diff --git a/src/cache.c b/src/cache.c index fddff72c31..e0b904be6e 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1431,9 +1431,9 @@ enum act_return http_action_req_cache_use(struct act_rule *rule, struct proxy *p return ACT_RET_CONT; if (px == strm_fe(s)) - HA_ATOMIC_ADD(&px->fe_counters.p.http.cache_lookups, 1); + _HA_ATOMIC_ADD(&px->fe_counters.p.http.cache_lookups, 1); else - HA_ATOMIC_ADD(&px->be_counters.p.http.cache_lookups, 1); + _HA_ATOMIC_ADD(&px->be_counters.p.http.cache_lookups, 1); shctx_lock(shctx_ptr(cache)); res = entry_exist(cache, s->txn->cache_hash); @@ -1450,9 +1450,9 @@ enum act_return http_action_req_cache_use(struct act_rule *rule, struct proxy *p appctx->ctx.cache.sent = 0; if (px == strm_fe(s)) - HA_ATOMIC_ADD(&px->fe_counters.p.http.cache_hits, 1); + _HA_ATOMIC_ADD(&px->fe_counters.p.http.cache_hits, 1); else - HA_ATOMIC_ADD(&px->be_counters.p.http.cache_hits, 1); + _HA_ATOMIC_ADD(&px->be_counters.p.http.cache_hits, 1); return ACT_RET_CONT; } else { shctx_lock(shctx_ptr(cache));