]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: fd: remove the now unneeded fd_mig_lock
authorWilly Tarreau <w@1wt.eu>
Tue, 3 Aug 2021 07:24:41 +0000 (09:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Aug 2021 14:03:36 +0000 (16:03 +0200)
This is not needed anymore since we don't use it when setting the running
mask anymore.

include/haproxy/fd.h
src/fd.c

index 5e9a96739e3ec15e36fcaa304ef72bf99af2cfc2..4160252134efb58049038ee0b8857d3ae9f2efc6 100644 (file)
@@ -67,11 +67,6 @@ void _fd_delete_orphan(int fd);
  */
 int fd_takeover(int fd, void *expected_owner);
 
-/* lock used by FD migration */
-#ifndef HA_HAVE_CAS_DW
-__decl_thread(extern HA_RWLOCK_T fd_mig_lock);
-#endif
-
 ssize_t fd_write_frag_line(int fd, size_t maxlen, const struct ist pfx[], size_t npfx, const struct ist msg[], size_t nmsg, int nl);
 
 /* close all FDs starting from <start> */
index 138a8fd16890f69270c7072a1cee02ee44a9d579..f746dffbae182ff8bfe9f4ff520fa42da6eb4c0f 100644 (file)
--- a/src/fd.c
+++ b/src/fd.c
@@ -328,10 +328,6 @@ void _fd_delete_orphan(int fd)
        _HA_ATOMIC_DEC(&ha_used_fds);
 }
 
-#ifndef HA_HAVE_CAS_DW
-__decl_thread(__decl_rwlock(fd_mig_lock));
-#endif
-
 /* Deletes an FD from the fdsets. The file descriptor is also closed, possibly
  * asynchronously. Only the owning thread may do this.
  */
@@ -354,13 +350,7 @@ void fd_delete(int fd)
         */
 
        HA_ATOMIC_OR(&fdtab[fd].running_mask, tid_bit);
-#ifndef HA_HAVE_CAS_DW
-       HA_RWLOCK_WRLOCK(OTHER_LOCK, &fd_mig_lock);
-#endif
        HA_ATOMIC_STORE(&fdtab[fd].thread_mask, 0);
-#ifndef HA_HAVE_CAS_DW
-       HA_RWLOCK_WRUNLOCK(OTHER_LOCK, &fd_mig_lock);
-#endif
        if (fd_clr_running(fd) == 0)
                _fd_delete_orphan(fd);
 }