Lines Matching defs:thr
64 static void ThreadStateDestructor(void *thr) {
65 int res = pthread_setspecific(thread_state_key, thr);
96 ThreadState *thr = (ThreadState *)pthread_getspecific(thread_state_key);
97 if (UNLIKELY(!thr)) {
98 thr = (ThreadState *)MmapOrDie(sizeof(ThreadState), "ThreadState");
99 int res = pthread_setspecific(thread_state_key, thr);
102 return thr;
105 void set_cur_thread(ThreadState *thr) {
106 int res = pthread_setspecific(thread_state_key, thr);
111 ThreadState *thr = (ThreadState *)pthread_getspecific(thread_state_key);
112 CHECK(thr);
113 if (thr == (ThreadState *)main_thread_state) {
125 UnmapOrDie(thr, sizeof(ThreadState));
207 ThreadState *thr = cur_thread();
209 ProcWire(proc, thr);
213 ThreadStart(thr, tid, GetTid(), ThreadType::Worker);
219 ThreadState *thr = cur_thread();
220 if (thr->tctx) {
281 void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) {
286 MemoryRangeImitateWrite(thr, pc, tls_addr, tls_size);