Lines Matching refs:thr
427 void ImitateTlsWrite(ThreadState *thr, uptr tls_addr, uptr tls_size) {
428 // Check that the thr object is in tls;
429 const uptr thr_beg = (uptr)thr;
430 const uptr thr_end = (uptr)thr + sizeof(*thr);
435 // Since the thr object is huge, skip it.
436 MemoryRangeImitateWrite(thr, /*pc=*/2, tls_addr, thr_beg - tls_addr);
437 MemoryRangeImitateWrite(thr, /*pc=*/2, thr_end,
467 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr());
468 if (thr == nullptr) {
473 thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr());
474 if (thr == nullptr) {
475 thr = reinterpret_cast<ThreadState*>(MmapOrDie(sizeof(ThreadState),
477 *get_android_tls_ptr() = reinterpret_cast<uptr>(thr);
491 return thr;
494 void set_cur_thread(ThreadState *thr) {
495 *get_android_tls_ptr() = reinterpret_cast<uptr>(thr);
503 ThreadState* thr = reinterpret_cast<ThreadState*>(*get_android_tls_ptr());
504 if (thr != dead_thread_state) {
506 UnmapOrDie(thr, sizeof(ThreadState));