Lines Matching refs:ThreadState
72 // the ThreadState object. The main thread's ThreadState is stored separately
76 ALIGNED(64) static char main_thread_state[sizeof(ThreadState)];
77 static ThreadState *main_thread_state_loc = (ThreadState *)main_thread_state;
82 static ThreadState **cur_thread_location() {
88 return (ThreadState **)MemToShadow(thread_identity);
91 ThreadState *cur_thread() {
92 return (ThreadState *)SignalSafeGetOrAllocate(
93 (uptr *)cur_thread_location(), sizeof(ThreadState));
96 void set_cur_thread(ThreadState *thr) {
102 // handler will try to access the unmapped ThreadState.
104 ThreadState **thr_state_loc = cur_thread_location();
107 // exit the main thread. Let's keep the main thread's ThreadState.
110 internal_munmap(*thr_state_loc, sizeof(ThreadState));
214 ThreadState *thr = cur_thread();
217 ThreadState *parent_thread_state = nullptr; // No parent.
224 ThreadState *thr = cur_thread();
284 void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) {
285 // The pointer to the ThreadState object is stored in the shadow memory