]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: list: Remove useless barriers.
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 13 Mar 2019 16:13:04 +0000 (17:13 +0100)
committerOlivier Houchard <cognet@ci0.org>
Thu, 14 Mar 2019 14:55:15 +0000 (15:55 +0100)
Don't bother forcing a barrier after using HA_ATOMIC_XCHG if we're about
to check the returned value anyway.

include/common/mini-clist.h

index 6088c41f73b9fd61d5cc99f289fd16c5dedc145b..c2fba4f7f283b76589ac2920e8de73254f9c0591 100644 (file)
@@ -192,7 +192,6 @@ struct cond_wordlist {
                        n = HA_ATOMIC_XCHG(&(lh)->n, LLIST_BUSY);          \
                        if (n == LLIST_BUSY)                               \
                                continue;                                  \
-                       __ha_barrier_atomic_store();                       \
                        p = HA_ATOMIC_XCHG(&n->p, LLIST_BUSY);             \
                        if (p == LLIST_BUSY) {                             \
                                (lh)->n = n;                               \
@@ -218,7 +217,6 @@ struct cond_wordlist {
                        p = HA_ATOMIC_XCHG(&(lh)->p, LLIST_BUSY);          \
                        if (p == LLIST_BUSY)                               \
                                continue;                                  \
-                       __ha_barrier_store();                              \
                        n = HA_ATOMIC_XCHG(&p->n, LLIST_BUSY);             \
                        if (n == LLIST_BUSY) {                             \
                                (lh)->p = p;                               \