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