Home | History | Annotate | Download | only in dd

Lines Matching refs:thr

22 static u32 CurrentStackTrace(Thread *thr, uptr skip) {
24 thr->ignore_interceptors = true;
26 thr->ignore_interceptors = false;
32 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);
100 void ThreadInit(Thread *thr) {
103 thr->dd_pt = ctx->dd->CreatePhysicalThread();
104 thr->dd_lt = ctx->dd->CreateLogicalThread(id);
107 void ThreadDestroy(Thread *thr) {
108 ctx->dd->DestroyPhysicalThread(thr->dd_pt);
109 ctx->dd->DestroyLogicalThread(thr->dd_lt);
112 void MutexBeforeLock(Thread *thr, uptr m, bool writelock) {
113 if (thr->ignore_interceptors)
115 Callback cb(thr);
122 ReportDeadlock(thr, ctx->dd->GetReport(&cb));
125 void MutexAfterLock(Thread *thr, uptr m, bool writelock, bool trylock) {
126 if (thr->ignore_interceptors)
128 Callback cb(thr);
135 ReportDeadlock(thr, ctx->dd->GetReport(&cb));
138 void MutexBeforeUnlock(Thread *thr, uptr m, bool writelock) {
139 if (thr->ignore_interceptors)
141 Callback cb(thr);
146 ReportDeadlock(thr, ctx->dd->GetReport(&cb));
149 void MutexDestroy(Thread *thr, uptr m) {
150 if (thr->ignore_interceptors)
152 Callback cb(thr);