Thread Local Storage initialization

joe_her wrote on Monday, November 19, 2018:

In a reenterant function, which can be used by many threads, I wouls like to have a variable which will be static if used in a single thread. So it looks like vTaskSetThreadLocalStoragePointer(), and pvTaskGetThreadLocalStoragePointer(), can do this for me. I just cna’t initialize the variable, can I assum ist is initialized to NULL?

rtel wrote on Monday, November 19, 2018:

Not sure if this answers your question - but when a task is created all of its thread local storage pointers are set to NULL - which if you interpret the pointers as a variable - will mean each thread local variable starts with the value 0.

joe_her wrote on Tuesday, November 20, 2018:

Yes it does. Thanks.