]> git.kaiwu.me - haproxy.git/commit
CLEANUP: compiler: add a THREAD_ALIGNED macro and use it where appropriate
authorWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 06:22:01 +0000 (08:22 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:59 +0000 (10:18 +0200)
commit8e3f5c6661cdd6194110d724a025f0caa78596d7
tree1496411e71ffa65787852a5d04aacc87bce001b6
parent920214e8c4bfc55d2daa8469e5c26cac34166c4a
CLEANUP: compiler: add a THREAD_ALIGNED macro and use it where appropriate

Sometimes we need to align a struct member or a struct's size only when
threads are enabled. This is the case on fdtab for example. Instead of
using ugly ifdefs in the code itself, let's have a THREAD_ALIGNED() macro
performing the alignment only when threads are enabled. For now this was
only applied to fd-t.h as it was the only place found.
include/haproxy/compiler.h
include/haproxy/fd-t.h