REORG: threads: move the struct thread_info from global.h to hathreads.h

It doesn't make sense to keep this struct thread_info in global.h, it
causes difficulties to access its contents from hathreads.h, let's move
it to the threads where it ought to have been created.
diff --git a/include/common/hathreads.h b/include/common/hathreads.h
index 2be5915..0dbec67 100644
--- a/include/common/hathreads.h
+++ b/include/common/hathreads.h
@@ -49,6 +49,12 @@
 enum { tid_bit = 1UL };
 enum { tid = 0 };
 
+extern struct thread_info {
+	/* pad to cache line (64B) */
+	char __pad[0];            /* unused except to check remaining room */
+	char __end[0] __attribute__((aligned(64)));
+} thread_info[MAX_THREADS];
+
 #define __decl_hathreads(decl)
 #define __decl_spinlock(lock)
 #define __decl_aligned_spinlock(lock)
@@ -369,6 +375,14 @@
 void thread_isolate();
 void thread_release();
 
+extern struct thread_info {
+	pthread_t pthread;
+	clockid_t clock_id;
+	/* pad to cache line (64B) */
+	char __pad[0];            /* unused except to check remaining room */
+	char __end[0] __attribute__((aligned(64)));
+} thread_info[MAX_THREADS];
+
 extern THREAD_LOCAL unsigned int tid;     /* The thread id */
 extern THREAD_LOCAL unsigned long tid_bit; /* The bit corresponding to the thread id */
 extern volatile unsigned long all_threads_mask;
diff --git a/include/types/global.h b/include/types/global.h
index 030a553..a52b258 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -243,11 +243,6 @@
 extern unsigned int rlim_fd_max_at_boot;
 extern int atexit_flag;
 
-extern struct thread_info {
-	__decl_hathreads(pthread_t pthread);
-	__decl_hathreads(clockid_t clock_id);
-} thread_info[MAX_THREADS];
-
 /* bit values to go with "warned" above */
 #define WARN_BLOCK_DEPRECATED       0x00000001
 /* unassigned : 0x00000002 */
diff --git a/src/hathreads.c b/src/hathreads.c
index fc17318..2dbf467 100644
--- a/src/hathreads.c
+++ b/src/hathreads.c
@@ -29,6 +29,7 @@
 #include <types/global.h>
 #include <proto/fd.h>
 
+struct thread_info thread_info[MAX_THREADS];
 
 #ifdef USE_THREAD