This is specific to threads, no backport is needed.
#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
#include <common/standard.h>
#include <proto/fd.h>
-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