I’m wondering if pgcc has a language extension like __thread to declare a variable as thread-private. Although non-standard, __thread is already supported by gcc, icc, [bg]xlc, oracle’s cc, clang, open64, fcc[px], cray’s cc.
I could emulate __thread using Pthreads, but a language extension would be far more convenient. Using OpenMP’s threadprivate is not an option here.
I tested __thread with pgcc 10.1-0 and 13.9-0. They both refuse the line
static __thread int threadlocal_foo;
(which is inside a function).
Is there anything similar to __thread in pgcc?