]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: atomic: remove the memcpy() call and dependency on string.h
authorWilly Tarreau <w@1wt.eu>
Thu, 28 Oct 2021 07:41:29 +0000 (09:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 Oct 2021 07:45:48 +0000 (09:45 +0200)
commit04065b87ced8bc9aad204942a49253e1650af48b
treeacf438be74470cb78500d5f69b5ebc06916b66cc
parentc050dc6c689e761af6c2d5a673086a1408164c6a
MINOR: atomic: remove the memcpy() call and dependency on string.h

The memcpy() call in the aarch64 version of __ha_cas_dw() is sometimes
inlined and sometimes not, depending on the gcc version. It's only used
to copy two void*, so let's use direct assignment instead of memcpy().
It would also be possible to change the asm code to directly write there,
but it's not worth it.

With this change the code is 8kB smaller with gcc-5.4.
include/haproxy/atomic.h