mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-19 17:13:37 -04:00
MEDIUM: cache: Use the new _HA_ATOMIC_* macros.
Use the new _HA_ATOMIC_* macros and add barriers where needed.
This commit is contained in:
parent
237f781f2d
commit
aa090d46fe
1 changed files with 4 additions and 4 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue