From: Willy Tarreau Date: Sat, 8 May 2021 10:26:10 +0000 (+0200) Subject: REORG: threads: move all_thread_mask() to thread.h X-Git-Tag: v2.4-dev19~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29c460bc075441bade41c21eae3aa49b264d20a4;p=thirdparty%2Fhaproxy.git REORG: threads: move all_thread_mask() to thread.h 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. --- diff --git a/include/haproxy/global.h b/include/haproxy/global.h index 1c50abaaa8..547a2b8cee 100644 --- a/include/haproxy/global.h +++ b/include/haproxy/global.h @@ -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, diff --git a/include/haproxy/thread.h b/include/haproxy/thread.h index 6a4b400f87..d158027f12 100644 --- a/include/haproxy/thread.h +++ b/include/haproxy/thread.h @@ -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 */