]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: fd/threads: remove the now unused fdtab_lock
authorWilly Tarreau <w@1wt.eu>
Mon, 29 Jan 2018 14:24:37 +0000 (15:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 29 Jan 2018 14:25:35 +0000 (15:25 +0100)
It was only used to protect maxfd computation and is not needed
anymore.

include/common/hathreads.h
include/proto/fd.h
src/fd.c

index cfcb48e9b60b2c36e7864f5646d717aa0bd63e34..fe1ee231ebaa0267ecdd74ca240a3dbd7079d22d 100644 (file)
@@ -203,7 +203,6 @@ int  thread_need_sync(void);
 
 enum lock_label {
        THREAD_SYNC_LOCK = 0,
-       FDTAB_LOCK,
        FDCACHE_LOCK,
        FD_LOCK,
        POLL_LOCK,
index 76d4c7e593aeecdc236dbc41f6d875b0f4dc2cc3..c9449ff868a35a3d783a713d2f1f163c875ac7f6 100644 (file)
@@ -40,7 +40,6 @@ extern unsigned long fd_cache_mask; // Mask of threads with events in the cache
 extern THREAD_LOCAL int *fd_updt;  // FD updates list
 extern THREAD_LOCAL int fd_nbupdt; // number of updates in the list
 
-__decl_hathreads(extern HA_SPINLOCK_T __attribute__((aligned(64))) fdtab_lock);      /* global lock to protect fdtab array */
 __decl_hathreads(extern HA_RWLOCK_T   __attribute__((aligned(64))) fdcache_lock);    /* global lock to protect fd_cache array */
 __decl_hathreads(extern HA_SPINLOCK_T __attribute__((aligned(64))) poll_lock);       /* global lock to protect poll info */
 
index 1fa170b58e96235f65481309c9cda2496b0b2c53..9398364e4845ad3bf39912649bd963c40ff875a2 100644 (file)
--- a/src/fd.c
+++ b/src/fd.c
@@ -174,7 +174,6 @@ unsigned long fd_cache_mask = 0; // Mask of threads with events in the cache
 THREAD_LOCAL int *fd_updt  = NULL;  // FD updates list
 THREAD_LOCAL int  fd_nbupdt = 0;   // number of updates in the list
 
-__decl_hathreads(HA_SPINLOCK_T fdtab_lock);       /* global lock to protect fdtab array */
 __decl_hathreads(HA_RWLOCK_T   fdcache_lock);     /* global lock to protect fd_cache array */
 __decl_hathreads(HA_SPINLOCK_T poll_lock);        /* global lock to protect poll info */
 
@@ -332,7 +331,6 @@ int init_pollers()
        for (p = 0; p < global.maxsock; p++)
                HA_SPIN_INIT(&fdtab[p].lock);
 
-       HA_SPIN_INIT(&fdtab_lock);
        HA_RWLOCK_INIT(&fdcache_lock);
        HA_SPIN_INIT(&poll_lock);
        do {
@@ -381,7 +379,6 @@ void deinit_pollers() {
        free(fdinfo);   fdinfo   = NULL;
        free(fdtab);    fdtab    = NULL;
 
-       HA_SPIN_DESTROY(&fdtab_lock);
        HA_RWLOCK_DESTROY(&fdcache_lock);
        HA_SPIN_DESTROY(&poll_lock);
 }