Lines Matching refs:cb

92   void MutexInit(DDCallback *cb, DDMutex *m);
93 void MutexBeforeLock(DDCallback *cb, DDMutex *m, bool wlock);
94 void MutexAfterLock(DDCallback *cb, DDMutex *m, bool wlock,
96 void MutexBeforeUnlock(DDCallback *cb, DDMutex *m, bool wlock);
97 void MutexDestroy(DDCallback *cb, DDMutex *m);
99 DDReport *GetReport(DDCallback *cb);
103 u32 allocateId(DDCallback *cb);
148 void DD::MutexInit(DDCallback *cb, DDMutex *m) { in MutexInit() argument
149 VPrintf(2, "#%llu: DD::MutexInit(%p)\n", cb->lt->ctx, m); in MutexInit()
168 u32 DD::allocateId(DDCallback *cb) { in allocateId() argument
183 VPrintf(3, "#%llu: DD::allocateId assign id %d\n", cb->lt->ctx, id); in allocateId()
187 void DD::MutexBeforeLock(DDCallback *cb, DDMutex *m, bool wlock) { in MutexBeforeLock() argument
189 cb->lt->ctx, m, wlock, cb->lt->nlocked); in MutexBeforeLock()
190 DDPhysicalThread *pt = cb->pt; in MutexBeforeLock()
191 DDLogicalThread *lt = cb->lt; in MutexBeforeLock()
194 if (owner == (uptr)cb->lt) { in MutexBeforeLock()
196 cb->lt->ctx); in MutexBeforeLock()
204 m->id = allocateId(cb); in MutexBeforeLock()
209 tm->stk = cb->Unwind(); in MutexBeforeLock()
212 cb->lt->ctx); in MutexBeforeLock()
235 link->stk1 = cb->Unwind(); in MutexBeforeLock()
238 cb->lt->ctx, getMutexId(mtx1), m->id); in MutexBeforeLock()
250 link->stk1 = cb->Unwind(); in MutexBeforeLock()
253 cb->lt->ctx, getMutexId(mtx1), m->id); in MutexBeforeLock()
259 cb->lt->ctx); in MutexBeforeLock()
266 void DD::MutexAfterLock(DDCallback *cb, DDMutex *m, bool wlock, in MutexAfterLock() argument
269 cb->lt->ctx, m, wlock, trylock, cb->lt->nlocked); in MutexAfterLock()
270 DDLogicalThread *lt = cb->lt; in MutexAfterLock()
273 if (owner == (uptr)cb->lt) { in MutexAfterLock()
274 VPrintf(3, "#%llu: DD::MutexAfterLock recursive\n", cb->lt->ctx); in MutexAfterLock()
281 VPrintf(3, "#%llu: DD::MutexAfterLock set owner\n", cb->lt->ctx); in MutexAfterLock()
284 atomic_store(&m->owner, (uptr)cb->lt, memory_order_relaxed); in MutexAfterLock()
292 m->id = allocateId(cb); in MutexAfterLock()
296 tm->stk = cb->Unwind(); in MutexAfterLock()
299 void DD::MutexBeforeUnlock(DDCallback *cb, DDMutex *m, bool wlock) { in MutexBeforeUnlock() argument
301 cb->lt->ctx, m, wlock, cb->lt->nlocked); in MutexBeforeUnlock()
302 DDLogicalThread *lt = cb->lt; in MutexBeforeUnlock()
305 if (owner == (uptr)cb->lt) { in MutexBeforeUnlock()
306 VPrintf(3, "#%llu: DD::MutexBeforeUnlock recursive\n", cb->lt->ctx); in MutexBeforeUnlock()
309 VPrintf(3, "#%llu: DD::MutexBeforeUnlock reset owner\n", cb->lt->ctx); in MutexBeforeUnlock()
315 if (cb->lt->locked[i].id == m->id) { in MutexBeforeUnlock()
323 void DD::MutexDestroy(DDCallback *cb, DDMutex *m) { in MutexDestroy() argument
325 cb->lt->ctx, m); in MutexDestroy()
326 DDLogicalThread *lt = cb->lt; in MutexDestroy()
413 DDReport *DD::GetReport(DDCallback *cb) { in GetReport() argument
414 if (!cb->pt->report_pending) in GetReport()
416 cb->pt->report_pending = false; in GetReport()
417 return &cb->pt->rep; in GetReport()