MEDIUM: sessions: Use the new _HA_ATOMIC_* macros.
Use the new _HA_ATOMIC_* macros and add barriers where needed.
diff --git a/src/session.c b/src/session.c
index 58317b8..ab49fb6 100644
--- a/src/session.c
+++ b/src/session.c
@@ -55,8 +55,8 @@
vars_init(&sess->vars, SCOPE_SESS);
sess->task = NULL;
sess->t_handshake = -1; /* handshake not done yet */
- HA_ATOMIC_ADD(&totalconn, 1);
- HA_ATOMIC_ADD(&jobs, 1);
+ _HA_ATOMIC_ADD(&totalconn, 1);
+ _HA_ATOMIC_ADD(&jobs, 1);
LIST_INIT(&sess->srv_list);
sess->idle_conns = 0;
}
@@ -97,7 +97,7 @@
pool_free(pool_head_sess_srv_list, srv_list);
}
pool_free(pool_head_session, sess);
- HA_ATOMIC_SUB(&jobs, 1);
+ _HA_ATOMIC_SUB(&jobs, 1);
}
/* callback used from the connection/mux layer to notify that a connection is