MINOR: lists: add a LIST_DEL_INIT() macro
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Mar 2019 18:32:11 +0000 (19:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 7 Mar 2019 10:45:44 +0000 (11:45 +0100)
commitc5bd311b2a2caa2435ec8b830a492d9e8f0aa131
tree7fe3ddf707053269814922dc7ecff1bd9283e68a
parent47e4e13c0177b1cc910e1a62575a5e12235ba2c4
MINOR: lists: add a LIST_DEL_INIT() macro

It turns out that we call LIST_DEL+LIST_INIT very frequently and that
the compiler doesn't know what pointers get modified in the e->n->p
and e->p->n dance, so when LIST_INIT() is called, it reloads these
pointers, which is quite a bit of a mess in terms of performance.

This patch adds LIST_DEL_INIT() to perform the two operations at once
using local temporary variables so that the compiler knows these
pointers are left unaffected.
include/common/mini-clist.h