]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: threads: move all_thread_mask() to thread.h
authorWilly Tarreau <w@1wt.eu>
Sat, 8 May 2021 10:26:10 +0000 (12:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 8 May 2021 10:26:10 +0000 (12:26 +0200)
It was declared in global.h, forcing plenty of source files to include
it only for this while it's only based on definitions from thread.h.

include/haproxy/global.h
include/haproxy/thread.h

index 1c50abaaa8688ca01fa72a13af675a5681d8b941..547a2b8cee66208a95a51dece95489b126c65bcc 100644 (file)
@@ -89,12 +89,6 @@ static inline unsigned long proc_mask(unsigned long mask)
        return mask ? mask : all_proc_mask;
 }
 
-/* returns a mask if set, otherwise all_threads_mask */
-static inline unsigned long thread_mask(unsigned long mask)
-{
-       return mask ? mask : all_threads_mask;
-}
-
 /* handle 'tainted' status */
 enum tainted_flags {
        TAINTED_CONFIG_EXP_KW_DECLARED = 0x1,
index 6a4b400f873ba61872e3e2c110763e3d5c793811..d158027f12d5332a13a87b0c233a7c5ebccd45ae 100644 (file)
@@ -969,4 +969,10 @@ static inline void __spin_unlock(enum lock_label lbl, struct ha_spinlock *l,
 
 #endif /* USE_THREAD */
 
+/* returns a mask if set, otherwise all_threads_mask */
+static inline unsigned long thread_mask(unsigned long mask)
+{
+       return mask ? mask : all_threads_mask;
+}
+
 #endif /* _HAPROXY_THREAD_H */