Home | History | Annotate | Download | only in dd

Lines Matching refs:thr

21 static u32 CurrentStackTrace(Thread *thr, uptr skip) {
23 thr->ignore_interceptors = true;
25 thr->ignore_interceptors = false;
31 static void PrintStackTrace(Thread *thr, u32 stk) {
34 thr->ignore_interceptors = true;
36 thr->ignore_interceptors = false;
39 static void ReportDeadlock(Thread *thr, DDReport *rep) {
48 PrintStackTrace(thr, rep->loop[i].stk[1]);
52 PrintStackTrace(thr, rep->loop[i].stk[0]);
58 Callback::Callback(Thread *thr)
59 : thr(thr) {
60 lt = thr->dd_lt;
61 pt = thr->dd_pt;
65 return CurrentStackTrace(thr, 3);
96 void ThreadInit(Thread *thr) {
99 thr->dd_pt = ctx->dd->CreatePhysicalThread();
100 thr->dd_lt = ctx->dd->CreateLogicalThread(id);
103 void ThreadDestroy(Thread *thr) {
104 ctx->dd->DestroyPhysicalThread(thr->dd_pt);
105 ctx->dd->DestroyLogicalThread(thr->dd_lt);
108 void MutexBeforeLock(Thread *thr, uptr m, bool writelock) {
109 if (thr->ignore_interceptors)
111 Callback cb(thr);
118 ReportDeadlock(thr, ctx->dd->GetReport(&cb));
121 void MutexAfterLock(Thread *thr, uptr m, bool writelock, bool trylock) {
122 if (thr->ignore_interceptors)
124 Callback cb(thr);
131 ReportDeadlock(thr, ctx->dd->GetReport(&cb));
134 void MutexBeforeUnlock(Thread *thr, uptr m, bool writelock) {
135 if (thr->ignore_interceptors)
137 Callback cb(thr);
142 ReportDeadlock(thr, ctx->dd->GetReport(&cb));
145 void MutexDestroy(Thread *thr, uptr m) {
146 if (thr->ignore_interceptors)
148 Callback cb(thr);