From: Olivier Houchard Date: Wed, 13 Mar 2019 16:13:04 +0000 (+0100) Subject: MEDIUM: list: Remove useless barriers. X-Git-Tag: v2.0-dev2~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17fbb4eb3fe9631bdc6b9223739df6dd7aa8761b;p=thirdparty%2Fhaproxy.git MEDIUM: list: Remove useless barriers. Don't bother forcing a barrier after using HA_ATOMIC_XCHG if we're about to check the returned value anyway. --- diff --git a/include/common/mini-clist.h b/include/common/mini-clist.h index 6088c41f73..c2fba4f7f2 100644 --- a/include/common/mini-clist.h +++ b/include/common/mini-clist.h @@ -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; \