Home | History | Annotate | Download | only in sanitizer_common

Lines Matching refs:lt

91   void DestroyLogicalThread(DDLogicalThread *lt);
102 void CycleCheck(DDPhysicalThread *pt, DDLogicalThread *lt, DDMutex *mtx);
103 void Report(DDPhysicalThread *pt, DDLogicalThread *lt, int npath);
141 DDLogicalThread *lt = (DDLogicalThread*)InternalAlloc(
143 lt->ctx = ctx;
144 lt->nlocked = 0;
145 return lt;
148 void DD::DestroyLogicalThread(DDLogicalThread *lt) {
149 lt->~DDLogicalThread();
150 InternalFree(lt);
154 VPrintf(2, "#%llu: DD::MutexInit(%p)\n", cb->lt->ctx, m);
190 VPrintf(3, "#%llu: DD::allocateId assign id %d\n", cb->lt->ctx, id);
196 cb->lt->ctx, m, wlock, cb->lt->nlocked);
198 DDLogicalThread *lt = cb->lt;
201 if (owner == (uptr)cb->lt) {
203 cb->lt->ctx);
207 CHECK_LE(lt->nlocked, kMaxNesting);
209 // FIXME(dvyukov): don't allocate id if lt->nlocked == 0?
213 ThreadMutex *tm = &lt->locked[lt->nlocked++];
217 if (lt->nlocked == 1) {
219 cb->lt->ctx);
225 for (int i = 0; i < lt->nlocked - 1; i++) {
226 u32 id1 = lt->locked[i].id;
227 u32 stk1 = lt->locked[i].stk;
240 link->tid = lt->ctx;
245 cb->lt->ctx, getMutexId(mtx1), m->id);
255 link->tid = lt->ctx;
260 cb->lt->ctx, getMutexId(mtx1), m->id);
266 cb->lt->ctx);
270 CycleCheck(pt, lt, m);
276 cb->lt->ctx, m, wlock, trylock, cb->lt->nlocked);
277 DDLogicalThread *lt = cb->lt;
280 if (owner == (uptr)cb->lt) {
281 VPrintf(3, "#%llu: DD::MutexAfterLock recursive\n", cb->lt->ctx);
288 VPrintf(3, "#%llu: DD::MutexAfterLock set owner\n", cb->lt->ctx);
291 atomic_store(&m->owner, (uptr)cb->lt, memory_order_relaxed);
297 CHECK_LE(lt->nlocked, kMaxNesting);
300 ThreadMutex *tm = &lt->locked[lt->nlocked++];
308 cb->lt->ctx, m, wlock, cb->lt->nlocked);
309 DDLogicalThread *lt = cb->lt;
312 if (owner == (uptr)cb->lt) {
313 VPrintf(3, "#%llu: DD::MutexBeforeUnlock recursive\n", cb->lt->ctx);
316 VPrintf(3, "#%llu: DD::MutexBeforeUnlock reset owner\n", cb->lt->ctx);
320 int last = lt->nlocked - 1;
322 if (cb->lt->locked[i].id == m->id) {
323 lt->locked[i] = lt->locked[last];
324 lt->nlocked--;
332 cb->lt->ctx, m);
333 DDLogicalThread *lt = cb->lt;
338 // Remove the mutex from lt->locked if there.
339 int last = lt->nlocked - 1;
341 if (lt->locked[i].id == m->id) {
342 lt->locked[i] = lt->locked[last];
343 lt->nlocked--;
363 void DD::CycleCheck(DDPhysicalThread *pt, DDLogicalThread *lt,
392 return Report(pt, lt, npath); // Bingo!
405 void DD::Report(DDPhysicalThread *pt, DDLogicalThread *lt, int npath) {