Lines Matching refs:lk
211 static void del_LockN ( Lock* lk ) in del_LockN() argument
213 tl_assert(HG_(is_sane_LockN)(lk)); in del_LockN()
214 tl_assert(lk->hbso); in del_LockN()
215 libhb_so_dealloc(lk->hbso); in del_LockN()
216 if (lk->heldBy) in del_LockN()
217 VG_(deleteBag)( lk->heldBy ); in del_LockN()
219 if (lk == admin_locks) { in del_LockN()
220 tl_assert(lk->admin_prev == NULL); in del_LockN()
221 if (lk->admin_next) in del_LockN()
222 lk->admin_next->admin_prev = NULL; in del_LockN()
223 admin_locks = lk->admin_next; in del_LockN()
226 tl_assert(lk->admin_prev != NULL); in del_LockN()
227 lk->admin_prev->admin_next = lk->admin_next; in del_LockN()
228 if (lk->admin_next) in del_LockN()
229 lk->admin_next->admin_prev = lk->admin_prev; in del_LockN()
232 VG_(memset)(lk, 0xAA, sizeof(*lk)); in del_LockN()
233 HG_(free)(lk); in del_LockN()
239 static void lockN_acquire_writer ( Lock* lk, Thread* thr ) in lockN_acquire_writer() argument
241 tl_assert(HG_(is_sane_LockN)(lk)); in lockN_acquire_writer()
249 if (lk->acquired_at == NULL) { in lockN_acquire_writer()
251 tl_assert(lk->heldBy == NULL); in lockN_acquire_writer()
253 lk->acquired_at in lockN_acquire_writer()
256 tl_assert(lk->heldBy != NULL); in lockN_acquire_writer()
260 switch (lk->kind) { in lockN_acquire_writer()
263 tl_assert(lk->heldBy == NULL); /* can't w-lock recursively */ in lockN_acquire_writer()
264 tl_assert(!lk->heldW); in lockN_acquire_writer()
265 lk->heldW = True; in lockN_acquire_writer()
266 lk->heldBy = VG_(newBag)( HG_(zalloc), "hg.lNaw.1", HG_(free) ); in lockN_acquire_writer()
267 VG_(addToBag)( lk->heldBy, (UWord)thr ); in lockN_acquire_writer()
270 if (lk->heldBy == NULL) in lockN_acquire_writer()
273 tl_assert(lk->heldW); in lockN_acquire_writer()
275 tl_assert(VG_(sizeUniqueBag(lk->heldBy)) == 1); in lockN_acquire_writer()
277 tl_assert(VG_(elemBag)(lk->heldBy, (UWord)thr) in lockN_acquire_writer()
278 == VG_(sizeTotalBag)(lk->heldBy)); in lockN_acquire_writer()
279 VG_(addToBag)(lk->heldBy, (UWord)thr); in lockN_acquire_writer()
282 tl_assert(lk->heldBy == NULL && !lk->heldW); /* must be unheld */ in lockN_acquire_writer()
287 tl_assert(HG_(is_sane_LockN)(lk)); in lockN_acquire_writer()
290 static void lockN_acquire_reader ( Lock* lk, Thread* thr ) in lockN_acquire_reader() argument
292 tl_assert(HG_(is_sane_LockN)(lk)); in lockN_acquire_reader()
295 tl_assert(lk->kind == LK_rdwr); in lockN_acquire_reader()
297 tl_assert(lk->heldBy == NULL in lockN_acquire_reader()
298 || (lk->heldBy != NULL && !lk->heldW)); in lockN_acquire_reader()
305 if (lk->acquired_at == NULL) { in lockN_acquire_reader()
307 tl_assert(lk->heldBy == NULL); in lockN_acquire_reader()
309 lk->acquired_at in lockN_acquire_reader()
312 tl_assert(lk->heldBy != NULL); in lockN_acquire_reader()
316 if (lk->heldBy) { in lockN_acquire_reader()
317 VG_(addToBag)(lk->heldBy, (UWord)thr); in lockN_acquire_reader()
319 lk->heldW = False; in lockN_acquire_reader()
320 lk->heldBy = VG_(newBag)( HG_(zalloc), "hg.lNar.1", HG_(free) ); in lockN_acquire_reader()
321 VG_(addToBag)( lk->heldBy, (UWord)thr ); in lockN_acquire_reader()
323 tl_assert(!lk->heldW); in lockN_acquire_reader()
324 tl_assert(HG_(is_sane_LockN)(lk)); in lockN_acquire_reader()
331 static void lockN_release ( Lock* lk, Thread* thr ) in lockN_release() argument
334 tl_assert(HG_(is_sane_LockN)(lk)); in lockN_release()
337 tl_assert(lk->heldBy); in lockN_release()
340 b = VG_(delFromBag)(lk->heldBy, (UWord)thr); in lockN_release()
344 tl_assert(lk->acquired_at); in lockN_release()
345 if (VG_(isEmptyBag)(lk->heldBy)) { in lockN_release()
346 VG_(deleteBag)(lk->heldBy); in lockN_release()
347 lk->heldBy = NULL; in lockN_release()
348 lk->heldW = False; in lockN_release()
349 lk->acquired_at = NULL; in lockN_release()
351 tl_assert(HG_(is_sane_LockN)(lk)); in lockN_release()
354 static void remove_Lock_from_locksets_of_all_owning_Threads( Lock* lk ) in remove_Lock_from_locksets_of_all_owning_Threads() argument
357 if (!lk->heldBy) { in remove_Lock_from_locksets_of_all_owning_Threads()
358 tl_assert(!lk->heldW); in remove_Lock_from_locksets_of_all_owning_Threads()
362 VG_(initIterBag)( lk->heldBy ); in remove_Lock_from_locksets_of_all_owning_Threads()
363 while (VG_(nextIterBag)( lk->heldBy, (UWord*)&thr, NULL )) { in remove_Lock_from_locksets_of_all_owning_Threads()
366 thr->locksetA, (UWord)lk )); in remove_Lock_from_locksets_of_all_owning_Threads()
368 = HG_(delFromWS)( univ_lsets, thr->locksetA, (UWord)lk ); in remove_Lock_from_locksets_of_all_owning_Threads()
370 if (lk->heldW) { in remove_Lock_from_locksets_of_all_owning_Threads()
372 thr->locksetW, (UWord)lk )); in remove_Lock_from_locksets_of_all_owning_Threads()
374 = HG_(delFromWS)( univ_lsets, thr->locksetW, (UWord)lk ); in remove_Lock_from_locksets_of_all_owning_Threads()
377 VG_(doneIterBag)( lk->heldBy ); in remove_Lock_from_locksets_of_all_owning_Threads()
468 static void pp_Lock ( Int d, Lock* lk, in pp_Lock() argument
474 VG_(printf)("Lock %p (ga %#lx) {\n", lk, lk->guestaddr); in pp_Lock()
476 VG_(printf)("Lock ga %#lx {\n", lk->guestaddr); in pp_Lock()
478 || !HG_(get_and_pp_addrdescr) ((Addr) lk->guestaddr)) in pp_Lock()
482 space(d+3); VG_(printf)("admin_n %p\n", lk->admin_next); in pp_Lock()
483 space(d+3); VG_(printf)("admin_p %p\n", lk->admin_prev); in pp_Lock()
484 space(d+3); VG_(printf)("magic 0x%x\n", (UInt)lk->magic); in pp_Lock()
487 space(d+3); VG_(printf)("unique %llu\n", lk->unique); in pp_Lock()
489 space(d+3); VG_(printf)("kind %s\n", show_LockKind(lk->kind)); in pp_Lock()
491 space(d+3); VG_(printf)("heldW %s\n", lk->heldW ? "yes" : "no"); in pp_Lock()
494 space(d+3); VG_(printf)("heldBy %p", lk->heldBy); in pp_Lock()
496 if (lk->heldBy) { in pp_Lock()
500 VG_(initIterBag)( lk->heldBy ); in pp_Lock()
501 while (VG_(nextIterBag)( lk->heldBy, (UWord*)&thr, &count )) { in pp_Lock()
506 lk->heldW ? 'W' : 'R', in pp_Lock()
515 VG_(doneIterBag)( lk->heldBy ); in pp_Lock()
524 Lock* lk; in pp_admin_locks() local
525 for (n = 0, lk = admin_locks; lk; n++, lk = lk->admin_next) { in pp_admin_locks()
529 for (i = 0, lk = admin_locks; lk; i++, lk = lk->admin_next) { in pp_admin_locks()
534 pp_Lock(d+3, lk, in pp_admin_locks()
544 Lock* lk; in pp_map_locks() local
549 (UWord*)&lk )) { in pp_map_locks()
551 VG_(printf)("guest %p -> Lock %p\n", gla, lk); in pp_map_locks()
735 Lock* lk = NULL; in map_locks_maybe_lookup() local
736 found = VG_(lookupFM)( map_locks, NULL, (UWord*)&lk, (UWord)ga ); in map_locks_maybe_lookup()
737 tl_assert(found ? lk != NULL : lk == NULL); in map_locks_maybe_lookup()
738 return lk; in map_locks_maybe_lookup()
744 Lock* lk = NULL; in map_locks_delete() local
746 (UWord*)&ga2, (UWord*)&lk, (UWord)ga ); in map_locks_delete()
750 tl_assert(lk != NULL); in map_locks_delete()
835 static Bool thread_is_a_holder_of_Lock ( Thread* thr, Lock* lk ) in thread_is_a_holder_of_Lock() argument
837 if (lk->heldBy) in thread_is_a_holder_of_Lock()
838 return VG_(elemBag)( lk->heldBy, (UWord)thr ) > 0; in thread_is_a_holder_of_Lock()
853 Lock* lk; in threads__sanity_check() local
862 lk = (Lock*)ls_words[i]; in threads__sanity_check()
864 if (!HG_(is_sane_LockN)(lk)) BAD("2"); in threads__sanity_check()
867 if (!thread_is_a_holder_of_Lock(thr,lk)) BAD("3"); in threads__sanity_check()
885 Lock* lk; in locks__sanity_check() local
888 for (i = 0, lk = admin_locks; lk; i++, lk = lk->admin_next) in locks__sanity_check()
895 (UWord*)&gla, (UWord*)&lk )) { in locks__sanity_check()
896 if (lk->guestaddr != gla) BAD("2"); in locks__sanity_check()
900 for (lk = admin_locks; lk; lk = lk->admin_next) { in locks__sanity_check()
903 if (!HG_(is_sane_LockN)(lk)) BAD("3"); in locks__sanity_check()
905 if (lk != map_locks_maybe_lookup(lk->guestaddr)) BAD("4"); in locks__sanity_check()
908 if (lk->heldBy) { in locks__sanity_check()
911 VG_(initIterBag)( lk->heldBy ); in locks__sanity_check()
912 while (VG_(nextIterBag)( lk->heldBy, in locks__sanity_check()
917 if (!HG_(elemWS)(univ_lsets, thr->locksetA, (UWord)lk)) in locks__sanity_check()
920 if (lk->heldW in locks__sanity_check()
921 && !HG_(elemWS)(univ_lsets, thr->locksetW, (UWord)lk)) in locks__sanity_check()
923 if ((!lk->heldW) in locks__sanity_check()
924 && HG_(elemWS)(univ_lsets, thr->locksetW, (UWord)lk)) in locks__sanity_check()
927 VG_(doneIterBag)( lk->heldBy ); in locks__sanity_check()
930 if (lk->heldW) BAD("9"); /* should be False if !heldBy */ in locks__sanity_check()
965 static void laog__handle_one_lock_deletion ( Lock* lk ); /* fwds */
1058 Lock* lk; in evhH__post_thread_w_acquires_lock() local
1074 lk = map_locks_lookup_or_create( in evhH__post_thread_w_acquires_lock()
1076 tl_assert( HG_(is_sane_LockN)(lk) ); in evhH__post_thread_w_acquires_lock()
1080 tl_assert(lk->hbso); in evhH__post_thread_w_acquires_lock()
1082 if (lk->heldBy == NULL) { in evhH__post_thread_w_acquires_lock()
1084 tl_assert(!lk->heldW); in evhH__post_thread_w_acquires_lock()
1085 lockN_acquire_writer( lk, thr ); in evhH__post_thread_w_acquires_lock()
1087 libhb_so_recv( thr->hbthr, lk->hbso, True/*strong_recv*/ ); in evhH__post_thread_w_acquires_lock()
1093 tl_assert(lk->heldBy); in evhH__post_thread_w_acquires_lock()
1094 if (!lk->heldW) { in evhH__post_thread_w_acquires_lock()
1103 tl_assert(VG_(sizeUniqueBag)(lk->heldBy) == 1); /* from precondition */ in evhH__post_thread_w_acquires_lock()
1105 if (thr != (Thread*)VG_(anyElementOfBag)(lk->heldBy)) { in evhH__post_thread_w_acquires_lock()
1118 if (lk->kind != LK_mbRec) { in evhH__post_thread_w_acquires_lock()
1127 lockN_acquire_writer( lk, thr ); in evhH__post_thread_w_acquires_lock()
1130 libhb_so_recv( thr->hbthr, lk->hbso, True/*strong_recv*/ ); in evhH__post_thread_w_acquires_lock()
1137 laog__pre_thread_acquires_lock( thr, lk ); in evhH__post_thread_w_acquires_lock()
1140 thr->locksetA = HG_(addToWS)( univ_lsets, thr->locksetA, (UWord)lk ); in evhH__post_thread_w_acquires_lock()
1141 thr->locksetW = HG_(addToWS)( univ_lsets, thr->locksetW, (UWord)lk ); in evhH__post_thread_w_acquires_lock()
1145 tl_assert(HG_(is_sane_LockN)(lk)); in evhH__post_thread_w_acquires_lock()
1155 Lock* lk; in evhH__post_thread_r_acquires_lock() local
1173 lk = map_locks_lookup_or_create( in evhH__post_thread_r_acquires_lock()
1175 tl_assert( HG_(is_sane_LockN)(lk) ); in evhH__post_thread_r_acquires_lock()
1179 tl_assert(lk->hbso); in evhH__post_thread_r_acquires_lock()
1181 if (lk->heldBy == NULL) { in evhH__post_thread_r_acquires_lock()
1183 tl_assert(!lk->heldW); in evhH__post_thread_r_acquires_lock()
1184 lockN_acquire_reader( lk, thr ); in evhH__post_thread_r_acquires_lock()
1186 libhb_so_recv( thr->hbthr, lk->hbso, False/*!strong_recv*/ ); in evhH__post_thread_r_acquires_lock()
1192 tl_assert(lk->heldBy); in evhH__post_thread_r_acquires_lock()
1193 if (lk->heldW) { in evhH__post_thread_r_acquires_lock()
1202 lockN_acquire_reader( lk, thr ); in evhH__post_thread_r_acquires_lock()
1205 libhb_so_recv( thr->hbthr, lk->hbso, False/*!strong_recv*/ ); in evhH__post_thread_r_acquires_lock()
1212 laog__pre_thread_acquires_lock( thr, lk ); in evhH__post_thread_r_acquires_lock()
1215 thr->locksetA = HG_(addToWS)( univ_lsets, thr->locksetA, (UWord)lk ); in evhH__post_thread_r_acquires_lock()
1220 tl_assert(HG_(is_sane_LockN)(lk)); in evhH__post_thread_r_acquires_lock()
1942 Lock* lk; in evh__HG_PTHREAD_MUTEX_DESTROY_PRE() local
1952 lk = map_locks_maybe_lookup( (Addr)mutex ); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1954 if (lk == NULL && mutex_is_init) { in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1962 if (lk == NULL || (lk->kind != LK_nonRec && lk->kind != LK_mbRec)) { in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1967 if (lk) { in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1968 tl_assert( HG_(is_sane_LockN)(lk) ); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1969 tl_assert( lk->guestaddr == (Addr)mutex ); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1970 if (lk->heldBy) { in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1975 remove_Lock_from_locksets_of_all_owning_Threads( lk ); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1976 VG_(deleteBag)( lk->heldBy ); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1977 lk->heldBy = NULL; in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1978 lk->heldW = False; in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1979 lk->acquired_at = NULL; in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1981 tl_assert( !lk->heldBy ); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1982 tl_assert( HG_(is_sane_LockN)(lk) ); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1985 laog__handle_one_lock_deletion(lk); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1986 map_locks_delete( lk->guestaddr ); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
1987 del_LockN( lk ); in evh__HG_PTHREAD_MUTEX_DESTROY_PRE()
2001 Lock* lk; in evh__HG_PTHREAD_MUTEX_LOCK_PRE() local
2010 lk = map_locks_maybe_lookup( (Addr)mutex ); in evh__HG_PTHREAD_MUTEX_LOCK_PRE()
2012 if (lk && (lk->kind == LK_rdwr)) { in evh__HG_PTHREAD_MUTEX_LOCK_PRE()
2017 if ( lk in evh__HG_PTHREAD_MUTEX_LOCK_PRE()
2019 && (lk->kind == LK_nonRec || lk->kind == LK_rdwr) in evh__HG_PTHREAD_MUTEX_LOCK_PRE()
2020 && lk->heldBy in evh__HG_PTHREAD_MUTEX_LOCK_PRE()
2021 && lk->heldW in evh__HG_PTHREAD_MUTEX_LOCK_PRE()
2022 && VG_(elemBag)( lk->heldBy, (UWord)thr ) > 0 ) { in evh__HG_PTHREAD_MUTEX_LOCK_PRE()
2030 if (lk->acquired_at) { in evh__HG_PTHREAD_MUTEX_LOCK_PRE()
2031 HG_(record_error_Misc_w_aux)( thr, errstr, auxstr, lk->acquired_at ); in evh__HG_PTHREAD_MUTEX_LOCK_PRE()
2095 Lock* lk; in evh__HG_PTHREAD_SPIN_INIT_OR_UNLOCK_PRE() local
2109 lk = map_locks_maybe_lookup( (Addr)slock ); in evh__HG_PTHREAD_SPIN_INIT_OR_UNLOCK_PRE()
2110 if (lk && lk->heldBy) { in evh__HG_PTHREAD_SPIN_INIT_OR_UNLOCK_PRE()
2122 Lock* lk; in evh__HG_PTHREAD_SPIN_INIT_OR_UNLOCK_POST() local
2132 lk = map_locks_maybe_lookup( (Addr)slock ); in evh__HG_PTHREAD_SPIN_INIT_OR_UNLOCK_POST()
2133 if (!lk) { in evh__HG_PTHREAD_SPIN_INIT_OR_UNLOCK_POST()
2306 Lock* lk = NULL; in evh__HG_PTHREAD_COND_SIGNAL_PRE() local
2308 lk = map_locks_maybe_lookup( (Addr)cvi->mx_ga ); in evh__HG_PTHREAD_COND_SIGNAL_PRE()
2311 if (lk) { in evh__HG_PTHREAD_COND_SIGNAL_PRE()
2312 if (lk->kind == LK_rdwr) { in evh__HG_PTHREAD_COND_SIGNAL_PRE()
2316 if (lk->heldBy == NULL) { in evh__HG_PTHREAD_COND_SIGNAL_PRE()
2321 if (lk->heldBy != NULL && 0 == VG_(elemBag)(lk->heldBy, (UWord)thr)) { in evh__HG_PTHREAD_COND_SIGNAL_PRE()
2347 Lock* lk; in evh__HG_PTHREAD_COND_WAIT_PRE() local
2359 lk = map_locks_maybe_lookup( (Addr)mutex ); in evh__HG_PTHREAD_COND_WAIT_PRE()
2364 if (lk == NULL) { in evh__HG_PTHREAD_COND_WAIT_PRE()
2370 tl_assert( HG_(is_sane_LockN)(lk) ); in evh__HG_PTHREAD_COND_WAIT_PRE()
2371 if (lk->kind == LK_rdwr) { in evh__HG_PTHREAD_COND_WAIT_PRE()
2377 if (lk->heldBy == NULL) { in evh__HG_PTHREAD_COND_WAIT_PRE()
2382 if (lk->heldBy != NULL in evh__HG_PTHREAD_COND_WAIT_PRE()
2383 && VG_(elemBag)( lk->heldBy, (UWord)thr ) == 0) { in evh__HG_PTHREAD_COND_WAIT_PRE()
2511 Lock* lk; in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE() local
2520 lk = map_locks_maybe_lookup( (Addr)rwl ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2522 if (lk == NULL || lk->kind != LK_rdwr) { in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2527 if (lk) { in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2528 tl_assert( HG_(is_sane_LockN)(lk) ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2529 tl_assert( lk->guestaddr == (Addr)rwl ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2530 if (lk->heldBy) { in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2535 remove_Lock_from_locksets_of_all_owning_Threads( lk ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2536 VG_(deleteBag)( lk->heldBy ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2537 lk->heldBy = NULL; in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2538 lk->heldW = False; in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2539 lk->acquired_at = NULL; in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2541 tl_assert( !lk->heldBy ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2542 tl_assert( HG_(is_sane_LockN)(lk) ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2545 laog__handle_one_lock_deletion(lk); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2546 map_locks_delete( lk->guestaddr ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2547 del_LockN( lk ); in evh__HG_PTHREAD_RWLOCK_DESTROY_PRE()
2562 Lock* lk; in evh__HG_PTHREAD_RWLOCK_LOCK_PRE() local
2572 lk = map_locks_maybe_lookup( (Addr)rwl ); in evh__HG_PTHREAD_RWLOCK_LOCK_PRE()
2573 if ( lk in evh__HG_PTHREAD_RWLOCK_LOCK_PRE()
2574 && (lk->kind == LK_nonRec || lk->kind == LK_mbRec) ) { in evh__HG_PTHREAD_RWLOCK_LOCK_PRE()
3634 static WordSetID /* in univ_laog */ laog__succs ( Lock* lk ) { in laog__succs() argument
3639 if (VG_(lookupFM)( laog, &keyW, (UWord*)&links, (UWord)lk )) { in laog__succs()
3641 tl_assert(keyW == (UWord)lk); in laog__succs()
3649 static WordSetID /* in univ_laog */ laog__preds ( Lock* lk ) { in laog__preds() argument
3654 if (VG_(lookupFM)( laog, &keyW, (UWord*)&links, (UWord)lk )) { in laog__preds()
3656 tl_assert(keyW == (UWord)lk); in laog__preds()
3767 Lock* lk in laog__pre_thread_acquires_lock() argument
3777 if (HG_(elemWS)( univ_lsets, thr->locksetA, (UWord)lk )) in laog__pre_thread_acquires_lock()
3786 other = laog__do_dfs_from_to(lk, thr->locksetA); in laog__pre_thread_acquires_lock()
3796 key.src_ga = lk->guestaddr; in laog__pre_thread_acquires_lock()
3809 thr, lk, other, in laog__pre_thread_acquires_lock()
3859 thr, lk, other, in laog__pre_thread_acquires_lock()
3869 tl_assert(lk->acquired_at); in laog__pre_thread_acquires_lock()
3874 laog__add_edge( old, lk ); in laog__pre_thread_acquires_lock()
3905 static void laog__handle_one_lock_deletion ( Lock* lk ) in laog__handle_one_lock_deletion() argument
3911 preds = laog__preds( lk ); in laog__handle_one_lock_deletion()
3912 succs = laog__succs( lk ); in laog__handle_one_lock_deletion()
3923 laog__del_edge( (Lock*)preds_words[i], lk ); in laog__handle_one_lock_deletion()
3926 laog__del_edge( lk, (Lock*)succs_words[j] ); in laog__handle_one_lock_deletion()
3950 (UWord*)&linked_lk, (UWord*)&links, (UWord)lk)) { in laog__handle_one_lock_deletion()
3951 tl_assert (linked_lk == lk); in laog__handle_one_lock_deletion()
4831 Lock* lk; in handle_gdb_monitor_command() local
4841 for (i = 0, lk = admin_locks; lk; i++, lk = lk->admin_next) { in handle_gdb_monitor_command()
4842 if (all_locks || lk_addr == lk->guestaddr) { in handle_gdb_monitor_command()
4843 pp_Lock(0, lk, in handle_gdb_monitor_command()