Вот так.
struct some_struct { // Other fields ..... __thread int tl; }
Я пытаюсь это сделать, но компилятор выдает эту ошибку.
./cv.h:16:2: error: '__thread' is only allowed on variable declarations __thread int tl;