From: Willy Tarreau Date: Wed, 24 Mar 2021 10:34:09 +0000 (+0100) Subject: CLEANUP: fd: remove unused fd_set_running_excl() X-Git-Tag: v2.3.8~5 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=b8ca98360cd92c410370a5752d4c5c935c684d9e;p=haproxy-2.3.git CLEANUP: fd: remove unused fd_set_running_excl() This one is no longer used and was the origin of the previously mentioned deadlock. (cherry picked from commit 6cf13119e2adeeed2520c66d2fc0cea6f6f23acb) [wt: not strictly needed but will catch offenders if any out-of-tree code were to rely on it] Signed-off-by: Willy Tarreau --- diff --git a/include/haproxy/fd.h b/include/haproxy/fd.h index ddf4d0b..8db2990 100644 --- a/include/haproxy/fd.h +++ b/include/haproxy/fd.h @@ -341,13 +341,6 @@ static inline int fd_set_running(int fd) #endif } -static inline void fd_set_running_excl(int fd) -{ - unsigned long old_mask = 0; - while (!_HA_ATOMIC_CAS(&fdtab[fd].running_mask, &old_mask, tid_bit)) - old_mask = 0; -} - /* remove tid_bit from the fd's running mask and returns the bits that remain * after the atomic operation. */