Lines Matching refs:thr

22 static u32 CurrentStackTrace(Thread *thr, uptr skip) {  in CurrentStackTrace()  argument
24 thr->ignore_interceptors = true; in CurrentStackTrace()
26 thr->ignore_interceptors = false; in CurrentStackTrace()
32 static void PrintStackTrace(Thread *thr, u32 stk) { in PrintStackTrace() argument
34 thr->ignore_interceptors = true; in PrintStackTrace()
36 thr->ignore_interceptors = false; in PrintStackTrace()
39 static void ReportDeadlock(Thread *thr, DDReport *rep) { in ReportDeadlock() argument
48 PrintStackTrace(thr, rep->loop[i].stk[1]); in ReportDeadlock()
52 PrintStackTrace(thr, rep->loop[i].stk[0]); in ReportDeadlock()
58 Callback::Callback(Thread *thr) in Callback() argument
59 : thr(thr) { in Callback()
60 lt = thr->dd_lt; in Callback()
61 pt = thr->dd_pt; in Callback()
65 return CurrentStackTrace(thr, 3); in Unwind()
100 void ThreadInit(Thread *thr) { in ThreadInit() argument
103 thr->dd_pt = ctx->dd->CreatePhysicalThread(); in ThreadInit()
104 thr->dd_lt = ctx->dd->CreateLogicalThread(id); in ThreadInit()
107 void ThreadDestroy(Thread *thr) { in ThreadDestroy() argument
108 ctx->dd->DestroyPhysicalThread(thr->dd_pt); in ThreadDestroy()
109 ctx->dd->DestroyLogicalThread(thr->dd_lt); in ThreadDestroy()
112 void MutexBeforeLock(Thread *thr, uptr m, bool writelock) { in MutexBeforeLock() argument
113 if (thr->ignore_interceptors) in MutexBeforeLock()
115 Callback cb(thr); in MutexBeforeLock()
122 ReportDeadlock(thr, ctx->dd->GetReport(&cb)); in MutexBeforeLock()
125 void MutexAfterLock(Thread *thr, uptr m, bool writelock, bool trylock) { in MutexAfterLock() argument
126 if (thr->ignore_interceptors) in MutexAfterLock()
128 Callback cb(thr); in MutexAfterLock()
135 ReportDeadlock(thr, ctx->dd->GetReport(&cb)); in MutexAfterLock()
138 void MutexBeforeUnlock(Thread *thr, uptr m, bool writelock) { in MutexBeforeUnlock() argument
139 if (thr->ignore_interceptors) in MutexBeforeUnlock()
141 Callback cb(thr); in MutexBeforeUnlock()
146 ReportDeadlock(thr, ctx->dd->GetReport(&cb)); in MutexBeforeUnlock()
149 void MutexDestroy(Thread *thr, uptr m) { in MutexDestroy() argument
150 if (thr->ignore_interceptors) in MutexDestroy()
152 Callback cb(thr); in MutexDestroy()