MINOR: threads: Use __decl_hathreads to declare locks

This macro should be used to declare variables or struct members depending on
the USE_THREAD compile option. It avoids the encapsulation of such declarations
between #ifdef/#endif. It is used to declare all lock variables.
This commit is contained in:
Christopher Faulet
2017-11-13 10:34:01 +01:00
committed by Willy Tarreau
parent f4cfcf9a26
commit 9dcf9b6f03
35 changed files with 53 additions and 125 deletions

View File

@@ -52,9 +52,7 @@ extern struct pool_head *pool2_buffer;
extern struct buffer buf_empty;
extern struct buffer buf_wanted;
extern struct list buffer_wq;
#ifdef USE_THREAD
extern HA_SPINLOCK_T buffer_wq_lock;
#endif
__decl_hathreads(HA_SPINLOCK_T buffer_wq_lock);
int init_buffer();
void deinit_buffer();