BUILD/MEDIUM: threads: rename thread_info struct to ha_thread_info
On Darwin, the thread_info name exists as a standard function thus
we need to rename our array to ha_thread_info to fix this conflict.
diff --git a/include/common/hathreads.h b/include/common/hathreads.h
index 8e78014..02568de 100644
--- a/include/common/hathreads.h
+++ b/include/common/hathreads.h
@@ -38,7 +38,7 @@
* only one thread is enabled, it equals 1.
*/
-/* thread info flags, for thread_info[].flags */
+/* thread info flags, for ha_thread_info[].flags */
#define TI_FL_STUCK 0x00000001
@@ -67,7 +67,7 @@
/* pad to cache line (64B) */
char __pad[0]; /* unused except to check remaining room */
char __end[0] __attribute__((aligned(64)));
-} thread_info[MAX_THREADS];
+} ha_thread_info[MAX_THREADS];
extern THREAD_LOCAL struct thread_info *ti; /* thread_info for the current thread */
@@ -167,7 +167,7 @@
static inline void ha_set_tid(unsigned int tid)
{
- ti = &thread_info[tid];
+ ti = &ha_thread_info[tid];
}
static inline void ha_thread_relax(void)
@@ -437,7 +437,7 @@
/* pad to cache line (64B) */
char __pad[0]; /* unused except to check remaining room */
char __end[0] __attribute__((aligned(64)));
-} thread_info[MAX_THREADS];
+} ha_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 */
@@ -480,7 +480,7 @@
{
tid = data;
tid_bit = (1UL << tid);
- ti = &thread_info[tid];
+ ti = &ha_thread_info[tid];
}
static inline void ha_thread_relax(void)