Reputation: 31
I'm learning the basic implementation principle of thread_lcoal of c++11 from emutls. I found that the __tls_init will be called when a thread_local variable was firstly accessed. And It will called __emutls_get_address to allocate or get the address of the thread_local variable.
I know that emutls memory space is an array with one extra slotto store the data array size. But I found there is a variable of type __emutls_control* which value is:
control void * 0x200002f8 <__emutls_v.__tls_guard>
What's the type __emutls_control is? And What's the __emutls_v.__tls_guard is?
Dose __emutls_v.__tls_guard exist in every emutls array?
Upvotes: 0
Views: 47