From: Willy Tarreau Date: Sun, 26 Nov 2017 10:00:37 +0000 (+0100) Subject: BUG/MINOR: threads: don't drop "extern" on the lock in include files X-Git-Tag: v1.8.0~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53bae85b8e9e8333e9a232fcd9a8aa085471f6cb;p=thirdparty%2Fhaproxy.git BUG/MINOR: threads: don't drop "extern" on the lock in include files Commit 9dcf9b6 ("MINOR: threads: Use __decl_hathreads to declare locks") accidently lost a few "extern" in certain lock declarations, possibly causing certain entries to be declared at multiple places. Apparently it hasn't caused any harm though. The offending ones were : - fdtab_lock - fdcache_lock - poll_lock - buffer_wq_lock --- diff --git a/include/common/buffer.h b/include/common/buffer.h index 6f5c8dd32e..976085e5eb 100644 --- a/include/common/buffer.h +++ b/include/common/buffer.h @@ -52,7 +52,7 @@ extern struct pool_head *pool_head_buffer; extern struct buffer buf_empty; extern struct buffer buf_wanted; extern struct list buffer_wq; -__decl_hathreads(HA_SPINLOCK_T buffer_wq_lock); +__decl_hathreads(extern HA_SPINLOCK_T buffer_wq_lock); int init_buffer(); void deinit_buffer(); diff --git a/include/proto/fd.h b/include/proto/fd.h index f81c64624e..ce23c1cf22 100644 --- a/include/proto/fd.h +++ b/include/proto/fd.h @@ -39,9 +39,9 @@ extern int fd_cache_num; // number of 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(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 */ +__decl_hathreads(extern HA_SPINLOCK_T fdtab_lock); /* global lock to protect fdtab array */ +__decl_hathreads(extern HA_RWLOCK_T fdcache_lock); /* global lock to protect fd_cache array */ +__decl_hathreads(extern HA_SPINLOCK_T poll_lock); /* global lock to protect poll info */ /* Deletes an FD from the fdsets, and recomputes the maxfd limit. * The file descriptor is also closed.