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;