Like this.
struct some_struct
{
// Other fields
.....
__thread int tl;
}
I\'m trying to do that but the compiler is giving me this error
C11 standard Section 6.7.1 Paragraph 2
At most, one storage-class specifier may be given in the declaration specifiers in a declaration, except that _Thread_local may appear with static or extern.120)
C11 standard Section 6.7.1 Paragraph 3
In the declaration of an object with block scope, if the declaration specifiers include _Thread_local, they shall also include either static or extern. If _Thread_local appears in any declaration of an object, it shall be present in every declaration of that object.