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

@@ -155,9 +155,7 @@ static THREAD_LOCAL struct sample_data static_sample_data;
struct list pattern_reference = LIST_HEAD_INIT(pattern_reference);
static struct lru64_head *pat_lru_tree;
#ifdef USE_THREAD
HA_SPINLOCK_T pat_lru_tree_lock;
#endif
__decl_hathreads(HA_SPINLOCK_T pat_lru_tree_lock);
static unsigned long long pat_lru_seed;
/*