search for: tlsbuffer

Displaying 2 results from an estimated 2 matches for "tlsbuffer".

Did you mean: t_buffer
2017 Nov 16
2
question about xray tls data initialization
..., comment written as // Using pthread_once(...) to initialize the thread-local data structures but at line 175, 183, code written as thread_local pthread_key_t key; // Ensure that we only actually ever do the pthread initialization once. thread_local bool UNUSED Unused = [] { new (&TLSBuffer) ThreadLocalData(); auto result = pthread_key_create(&key, +[](void *) { auto &TLD = *reinterpret_cast<ThreadLocalData *>(&TLSBuffer); I'm confused that pthread_key_t and Unused are both thread_local variable, doesn't it mean the following lambda will run for e...
2017 Nov 21
2
question about xray tls data initialization
..._once(...) to initialize the thread-local data structures > > > but at line 175, 183, code written as > > thread_local pthread_key_t key; > > // Ensure that we only actually ever do the pthread initialization once. > thread_local bool UNUSED Unused = [] { > new (&TLSBuffer) ThreadLocalData(); > auto result = pthread_key_create(&key, +[](void *) { > auto &TLD = *reinterpret_cast<ThreadLocalData *>(&TLSBuffer); > > > I'm confused that pthread_key_t and Unused are both thread_local > variable, doesn't it mean the follo...