From e9a896e09e8d56523f1af57cf454534b11e0fbe7 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 14 Nov 2017 10:16:04 +0100 Subject: [PATCH] BUG/MINOR: threads: tid_bit must be a unsigned long This is specific to threads, no backport is needed. --- include/common/hathreads.h | 2 +- src/hathreads.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/common/hathreads.h b/include/common/hathreads.h index 31d0f533b9..9782ca9a07 100644 --- a/include/common/hathreads.h +++ b/include/common/hathreads.h @@ -26,7 +26,7 @@ #define MAX_THREADS_MASK ((unsigned long)-1) extern THREAD_LOCAL unsigned int tid; /* The thread id */ -extern THREAD_LOCAL unsigned int tid_bit; /* The bit corresponding to the thread id */ +extern THREAD_LOCAL unsigned long tid_bit; /* The bit corresponding to the thread id */ #ifndef USE_THREAD diff --git a/src/hathreads.c b/src/hathreads.c index 2856a9f24c..eb9cd3fcec 100644 --- a/src/hathreads.c +++ b/src/hathreads.c @@ -18,8 +18,8 @@ #include #include -THREAD_LOCAL unsigned int tid = 0; -THREAD_LOCAL unsigned int tid_bit = (1UL << 0); +THREAD_LOCAL unsigned int tid = 0; +THREAD_LOCAL unsigned long tid_bit = (1UL << 0); #ifdef USE_THREAD -- 2.47.3