]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
IMPORT: plock: also support inlining the int code
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Aug 2023 20:25:34 +0000 (22:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Aug 2023 22:09:05 +0000 (00:09 +0200)
Commit 9db830b ("plock: support inlining exponential backoff code")
added an option to support inlining of the wait code for longs but
forgot to do it for ints. Let's do it now.

This is plock upstream commit b1f9f0d252fa40577d11cfb2bc0a809d6960a297.

include/import/plock.h

index 4e6ab8c264980f062615065c235961af181ecf30..1345e958a4ffef1d2125717934f574d6720d7d7e 100644 (file)
@@ -138,7 +138,11 @@ static unsigned long pl_wait_unlock_long(const unsigned long *lock, const unsign
                _r; /* return value */            \
        })
 #else
+# if defined(PLOCK_INLINE_EBO)
+__attribute__((unused,always_inline,no_instrument_function)) inline
+# else
 __attribute__((unused,noinline,no_instrument_function))
+# endif
 static unsigned int pl_wait_unlock_int(const unsigned int *lock, const unsigned int mask)
 {
        unsigned int ret;