Lines Matching refs:lock
339 struct lockdep_lock *lock = NULL; in __lockdep_lock_acquire() local
348 TAILQ_FOREACH(lock, owned, link) { in __lockdep_lock_acquire()
349 res = lockdep_add_edge(lock->node, node, lock->call_stack, in __lockdep_lock_acquire()
363 lock = calloc(1, sizeof(*lock)); in __lockdep_lock_acquire()
364 if (!lock) in __lockdep_lock_acquire()
367 lock->node = node; in __lockdep_lock_acquire()
368 lock->call_stack = acq_stack; in __lockdep_lock_acquire()
369 TAILQ_INSERT_TAIL(owned, lock, link); in __lockdep_lock_acquire()
384 struct lockdep_lock *lock = NULL; in __lockdep_lock_tryacquire() local
392 lock = calloc(1, sizeof(*lock)); in __lockdep_lock_tryacquire()
393 if (!lock) in __lockdep_lock_tryacquire()
396 lock->node = node; in __lockdep_lock_tryacquire()
397 lock->call_stack = acq_stack; in __lockdep_lock_tryacquire()
398 TAILQ_INSERT_TAIL(owned, lock, link); in __lockdep_lock_tryacquire()
405 struct lockdep_lock *lock = NULL; in __lockdep_lock_release() local
407 TAILQ_FOREACH_REVERSE(lock, owned, lockdep_lock_head, link) { in __lockdep_lock_release()
408 if (lock->node->lock_id == id) { in __lockdep_lock_release()
409 TAILQ_REMOVE(owned, lock, link); in __lockdep_lock_release()
410 free(lock->call_stack); in __lockdep_lock_release()
411 free(lock); in __lockdep_lock_release()
451 struct lockdep_lock *lock = NULL; in lockdep_queue_delete() local
454 TAILQ_FOREACH_SAFE(lock, owned, link, next) { in lockdep_queue_delete()
455 TAILQ_REMOVE(owned, lock, link); in lockdep_queue_delete()
456 free(lock); in lockdep_queue_delete()