MEDIUM: proxy: Use the new _HA_ATOMIC_* macros.
Use the new _HA_ATOMIC_* macros and add barriers where needed.
diff --git a/include/proto/proxy.h b/include/proto/proxy.h
index 7bd9421..b509dff 100644
--- a/include/proto/proxy.h
+++ b/include/proto/proxy.h
@@ -121,9 +121,9 @@
/* increase the number of cumulated connections received on the designated frontend */
static void inline proxy_inc_fe_conn_ctr(struct listener *l, struct proxy *fe)
{
- HA_ATOMIC_ADD(&fe->fe_counters.cum_conn, 1);
+ _HA_ATOMIC_ADD(&fe->fe_counters.cum_conn, 1);
if (l->counters)
- HA_ATOMIC_ADD(&l->counters->cum_conn, 1);
+ _HA_ATOMIC_ADD(&l->counters->cum_conn, 1);
HA_ATOMIC_UPDATE_MAX(&fe->fe_counters.cps_max,
update_freq_ctr(&fe->fe_conn_per_sec, 1));
}
@@ -132,9 +132,9 @@
static void inline proxy_inc_fe_sess_ctr(struct listener *l, struct proxy *fe)
{
- HA_ATOMIC_ADD(&fe->fe_counters.cum_sess, 1);
+ _HA_ATOMIC_ADD(&fe->fe_counters.cum_sess, 1);
if (l->counters)
- HA_ATOMIC_ADD(&l->counters->cum_sess, 1);
+ _HA_ATOMIC_ADD(&l->counters->cum_sess, 1);
HA_ATOMIC_UPDATE_MAX(&fe->fe_counters.sps_max,
update_freq_ctr(&fe->fe_sess_per_sec, 1));
}
@@ -142,7 +142,7 @@
/* increase the number of cumulated connections on the designated backend */
static void inline proxy_inc_be_ctr(struct proxy *be)
{
- HA_ATOMIC_ADD(&be->be_counters.cum_conn, 1);
+ _HA_ATOMIC_ADD(&be->be_counters.cum_conn, 1);
HA_ATOMIC_UPDATE_MAX(&be->be_counters.sps_max,
update_freq_ctr(&be->be_sess_per_sec, 1));
}
@@ -150,7 +150,7 @@
/* increase the number of cumulated requests on the designated frontend */
static void inline proxy_inc_fe_req_ctr(struct proxy *fe)
{
- HA_ATOMIC_ADD(&fe->fe_counters.p.http.cum_req, 1);
+ _HA_ATOMIC_ADD(&fe->fe_counters.p.http.cum_req, 1);
HA_ATOMIC_UPDATE_MAX(&fe->fe_counters.p.http.rps_max,
update_freq_ctr(&fe->fe_req_per_sec, 1));
}