]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: fd: get rid of the __GET_{NEXT,PREV} macros
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Jul 2022 12:43:51 +0000 (14:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 17:41:26 +0000 (19:41 +0200)
commit4d9888ca694390891840037660f4b6afdb58e355
treeb7b10f8d59cee40d263719a193bca606519fb5b5
parent740038c8b98bbf100a551f41fdd40817b99ce879
CLEANUP: fd: get rid of the __GET_{NEXT,PREV} macros

They were initially made to deal with both the cache and the update list
but there's no cache anymore and keeping them for the update list adds a
lot of obfuscation that is really not desired. Let's get rid of them now.

Their purpose was simply to get a pointer to fdtab[fd].update.{,next,prev}
in order to perform atomic tests and modifications. The offset passed in
argument to the functions (fd_add_to_fd_list() and fd_rm_from_fd_list())
was the offset of the ->update field in fdtab, and as it's not used anymore
it was removed. This also removes a number of casts, though those used by
the atomic ops have to remain since only scalars are supported.
include/haproxy/fd.h
src/fd.c