From aa090d46fef7abae5cd28c9f368c7e80db3018f6 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Fri, 8 Mar 2019 18:49:24 +0100 Subject: [PATCH] MEDIUM: cache: Use the new _HA_ATOMIC_* macros. Use the new _HA_ATOMIC_* macros and add barriers where needed. --- src/cache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cache.c b/src/cache.c index fddff72c3..e0b904be6 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));