]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
IMPORT: plock: export the uninlined version of the lock wait function
authorWilly Tarreau <w@1wt.eu>
Fri, 7 Feb 2025 15:45:21 +0000 (16:45 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Feb 2025 17:04:29 +0000 (18:04 +0100)
The inlining of the lock waiting function was made more easily
configurable with commit 7505c2e ("plock: always expose the inline
version of the lock wait function"). However, the standard one remained
static, but in order to resolve the symbols in "perf top", it's much
better to export it, so let's move "static" with "inline" and leave it
exported when PLOCK_INLINE_EBO is not set.

This is plock commit 3bea7812ec705b9339bbb0ed482a2cd8aa6c185c.

include/import/plock.h

index fc001e2d19bf8e32f040c913b0a4d45926793a3b..47ff617a97bd5efff05fa3f3e36471ea4f183234 100644 (file)
@@ -114,11 +114,11 @@ static unsigned long __pl_wait_unlock_long(const unsigned long *lock, const unsi
 }
 
 # if defined(PLOCK_INLINE_EBO)
-__attribute__((unused,always_inline,no_instrument_function)) inline
+__attribute__((unused,always_inline,no_instrument_function)) static inline
 # else
-__attribute__((unused,noinline,no_instrument_function))
+__attribute__((unused,noinline,no_instrument_function,weak))
 # endif
-static unsigned long pl_wait_unlock_long(const unsigned long *lock, const unsigned long mask)
+unsigned long pl_wait_unlock_long(const unsigned long *lock, const unsigned long mask)
 {
        return __pl_wait_unlock_long(lock, mask);
 }
@@ -183,11 +183,11 @@ static unsigned int __pl_wait_unlock_int(const unsigned int *lock, const unsigne
 }
 
 # if defined(PLOCK_INLINE_EBO)
-__attribute__((unused,always_inline,no_instrument_function)) inline
+__attribute__((unused,always_inline,no_instrument_function)) static inline
 # else
-__attribute__((unused,noinline,no_instrument_function))
+__attribute__((unused,noinline,no_instrument_function,weak))
 # endif
-static unsigned int pl_wait_unlock_int(const unsigned int *lock, const unsigned int mask)
+unsigned int pl_wait_unlock_int(const unsigned int *lock, const unsigned int mask)
 {
        return __pl_wait_unlock_int(lock, mask);
 }