]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: threads: don't drop "extern" on the lock in include files
authorWilly Tarreau <w@1wt.eu>
Sun, 26 Nov 2017 10:00:37 +0000 (11:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 26 Nov 2017 10:10:50 +0000 (11:10 +0100)
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

include/common/buffer.h
include/proto/fd.h

index 6f5c8dd32e9b8e84deb93956201157fff95079fe..976085e5ebbdd1f01f0f07f0847fc9a0520fe08f 100644 (file)
@@ -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();
index f81c64624e89c7aee87491094280ed64478e03de..ce23c1cf2256d6570f5c10846b70819897bdea19 100644 (file)
@@ -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.