]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: applets: Use the new _HA_ATOMIC_* macros.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 8 Mar 2019 17:46:48 +0000 (18:46 +0100)
committerOlivier Houchard <cognet@ci0.org>
Mon, 11 Mar 2019 16:02:37 +0000 (17:02 +0100)
Use the new _HA_ATOMIC_* macros and add barriers where needed.

include/proto/applet.h

index d664fd9b246c604cbc6b18bfed7fb5b2bed001e7..efcc52544d2097d9dd9b410295dfac02ae2c3978 100644 (file)
@@ -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)