]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: compiler: add new alignment macros
authorWilly Tarreau <w@1wt.eu>
Sat, 22 Feb 2020 14:51:39 +0000 (15:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Feb 2020 09:34:43 +0000 (10:34 +0100)
commit226ef26056d9e6151c9838e70a3e2f4db5068cd8
tree565ce9e396a3b647683ab733d7f4b3d01e08cb1c
parent7f26391bc51ad56c31480d03f56e1db604f1c617
MINOR: compiler: add new alignment macros

This commit adds ALWAYS_ALIGN(), MAYBE_ALIGN() and ATOMIC_ALIGN() to
be placed as delimitors inside structures to force alignment to a
given size. These depend on the architecture's capabilities so that
it is possible to always align, align only on archs not supporting
unaligned accesses at all, or only on those not supporting them for
atomic accesses (e.g. before a lock).
include/common/compiler.h