I am trying to make some code thread safe for use with pthreads. This code is written in C++, but is linked to using SWIG. g++ compiles this correctly, but when swig tries to create a wrapper, I get:
fast_alloc.hh:109: Error: Syntax error in input(3)
The original, unsafe code that compiles correctly is:
static void *freeLists[Num_Buckets];
and the error occurs when I change it to:
static __thread void *freeLists[Num_Buckets];