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.
diff --git a/src/hlua.c b/src/hlua.c
index 439bbf4..dbdc975 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -115,9 +115,7 @@
* and RESET_SAFE_LJMP manipulates the Lua stack, so it will be careful
* to set mutex around these functions.
*/
-#ifdef USE_THREAD
-HA_SPINLOCK_T hlua_global_lock;
-#endif
+__decl_hathreads(HA_SPINLOCK_T hlua_global_lock);
THREAD_LOCAL jmp_buf safe_ljmp_env;
static int hlua_panic_safe(lua_State *L) { return 0; }
static int hlua_panic_ljmp(lua_State *L) { longjmp(safe_ljmp_env, 1); }