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/include/proto/applet.h b/include/proto/applet.h
index 1a621a1..914b496 100644
--- a/include/proto/applet.h
+++ b/include/proto/applet.h
@@ -31,9 +31,7 @@
 
 extern unsigned int nb_applets;
 extern unsigned int applets_active_queue;
-#ifdef USE_THREAD
-extern HA_SPINLOCK_T applet_active_lock;
-#endif
+__decl_hathreads(extern HA_SPINLOCK_T applet_active_lock);
 extern struct list applet_active_queue;
 
 void applet_run_active();
diff --git a/include/proto/fd.h b/include/proto/fd.h
index 813e4f3..f81c646 100644
--- a/include/proto/fd.h
+++ b/include/proto/fd.h
@@ -39,11 +39,9 @@
 extern THREAD_LOCAL int *fd_updt;  // FD updates list
 extern THREAD_LOCAL int fd_nbupdt; // number of updates in the list
 
-#ifdef USE_THREAD
-HA_SPINLOCK_T fdtab_lock;      /* global lock to protect fdtab array */
-HA_RWLOCK_T   fdcache_lock;    /* global lock to protect fd_cache array */
-HA_SPINLOCK_T poll_lock;       /* global lock to protect poll info */
-#endif
+__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 */
 
 /* Deletes an FD from the fdsets, and recomputes the maxfd limit.
  * The file descriptor is also closed.
diff --git a/include/proto/signal.h b/include/proto/signal.h
index 084fa7d..32f6ce6 100644
--- a/include/proto/signal.h
+++ b/include/proto/signal.h
@@ -22,9 +22,7 @@
 extern struct signal_descriptor signal_state[];
 extern struct pool_head *pool2_sig_handlers;
 
-#ifdef USE_THREAD
-extern HA_SPINLOCK_T signals_lock;
-#endif
+__decl_hathreads(extern HA_SPINLOCK_T signals_lock);
 
 void signal_handler(int sig);
 void __signal_process_queue();
diff --git a/include/proto/task.h b/include/proto/task.h
index e6ba461..9461b59 100644
--- a/include/proto/task.h
+++ b/include/proto/task.h
@@ -89,10 +89,9 @@
 extern unsigned int niced_tasks;  /* number of niced tasks in the run queue */
 extern struct pool_head *pool2_task;
 extern struct pool_head *pool2_notification;
-#ifdef USE_THREAD
-extern HA_SPINLOCK_T rq_lock;        /* spin lock related to run queue */
-extern HA_SPINLOCK_T wq_lock;        /* spin lock related to wait queue */
-#endif
+
+__decl_hathreads(extern HA_SPINLOCK_T rq_lock);  /* spin lock related to run queue */
+__decl_hathreads(extern HA_SPINLOCK_T wq_lock);  /* spin lock related to wait queue */
 
 /* return 0 if task is in run queue, otherwise non-zero */
 static inline int task_in_rq(struct task *t)