From: Olivier Houchard Date: Fri, 8 Mar 2019 17:46:48 +0000 (+0100) Subject: MEDIUM: applets: Use the new _HA_ATOMIC_* macros. X-Git-Tag: v2.0-dev2~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a2735340fb195f6a9df1d7e3d8918f4a25a4ce68;p=thirdparty%2Fhaproxy.git MEDIUM: applets: Use the new _HA_ATOMIC_* macros. Use the new _HA_ATOMIC_* macros and add barriers where needed. --- diff --git a/include/proto/applet.h b/include/proto/applet.h index d664fd9b24..efcc52544d 100644 --- a/include/proto/applet.h +++ b/include/proto/applet.h @@ -75,7 +75,7 @@ static inline struct appctx *appctx_new(struct applet *applet, unsigned long thr LIST_INIT(&appctx->buffer_wait.list); appctx->buffer_wait.target = appctx; appctx->buffer_wait.wakeup_cb = appctx_buf_available; - HA_ATOMIC_ADD(&nb_applets, 1); + _HA_ATOMIC_ADD(&nb_applets, 1); } return appctx; } @@ -95,7 +95,7 @@ static inline void __appctx_free(struct appctx *appctx) } pool_free(pool_head_connection, appctx); - HA_ATOMIC_SUB(&nb_applets, 1); + _HA_ATOMIC_SUB(&nb_applets, 1); } static inline void appctx_free(struct appctx *appctx)