Lines Matching refs:lock

57  *	File:	kern/lock.c
66 #include <kern/lock.h>
121 * Perform simple lock checks.
132 * of the various lock routines. However, this information
155 * Portable lock package implementation of usimple_locks.
363 panic("Spinlock acquisition timed out: lock=%p, lock owner thread=0x%lx, current_thread: %p, lock owner active on CPU 0x%x, current owner: 0x%lx", l, lowner, current_thread(), lock_cpu, (uintptr_t)l->interlock.lock_data);
432 #define USLOCK_CHECKED 0x0001 /* lock is being checked */
433 #define USLOCK_TAKEN 0x0002 /* lock has been taken */
434 #define USLOCK_INIT 0xBAA0 /* lock has been initialized */
440 * Trace activities of a particularly interesting lock.
455 panic("lock initialization: null lock pointer");
478 panic("%s: null lock pointer", caller);
480 panic("%s: %p is not a usimple lock, 0x%x", caller, l, l->lock_type);
482 panic("%s: %p is not an initialized lock, 0x%x", caller, l, l->debug.state);
504 * Note that we have a weird case where we are getting a lock when we are]
506 * current threads, therefore we can't tell if we are trying to retake a lock
513 printf("%s: lock %p already locked (at %p) by",
544 panic("%s: lock %p became uninitialized",
547 panic("%s: lock 0x%p became TAKEN by someone else",
563 * yet released the hardware lock.
583 panic("%s: lock 0x%p hasn't been taken",
586 panic("%s: unlocking lock 0x%p, owned by thread %p",
589 printf("%s: unlocking lock 0x%p on cpu 0x%x",
630 * lock acquisition attempt, so it's safe
645 panic("%s: lock 0x%p became uninitialized",
648 panic("%s: lock 0x%p became TAKEN by someone else",
663 * specific lock of interest. The result is a series of
664 * XPRs showing lock operations on that lock. The lock_seq
692 * Allocate a lock for external users who cannot
714 * Free a lock allocated for external users.
729 * Initialize a lock; required before use.
730 * Note that clients declare the "struct lock"
755 * for the lock. These work on uniprocessor systems.
785 * Improves a read-only lock to one with
787 * already requested an upgrade to a write lock,
788 * no lock is held upon return.
882 * for the lock. These work on uniprocessor systems.
917 * This inline is used when busy-waiting for an rw lock.
918 * If interrupts were disabled when the lock primitive was called,
941 * there are already threads waiting on this lock... this
945 * the current number of threads sharing this lock exceeds our capacity to run them
1016 * being able to grab the lock exclusively
1095 * being able to grab the lock exclusively
1118 * must own the lock now, since we checked for
1163 * word of the lock at the time of a successful
1165 * it represents the state of the lock before we
1172 * this by examining the state of the lock before
1185 * lock in question... we'll fake up a pointer to it
1224 panic("lck_rw_unlock(): Invalid RW lock type: %d\n", lck_rw_type);
1240 panic("lck_rw_unlock(): lock held in mode: %d\n", ret);
1256 panic("lck_rw_unlock_exclusive(): lock held in mode: %d\n", ret);
1273 panic("lck_rw_lock(): Invalid RW lock type: %x\n", lck_rw_type);
1280 * assembly fast path code has determined that this lock
1282 * until we can acquire the lock in the shared mode
1337 * being able to grab the lock for read
1401 * lock in question... we'll fake up a pointer to it
1410 * Since we've released the read lock, wake
1428 * and then we can return as the exclusive holder of this lock
1547 * lock in question... we'll fake up a pointer to it
1557 * don't wake up anyone waiting to take the lock exclusively
1562 * or the lock is NOT marked as rw_priv_excl (writers have privilege)
1589 panic("lck_rw_try_lock(): Invalid rw lock type: %x\n", lck_rw_type);
1623 panic("rw lock (%p) not held (mode=%u), first word %08x\n", lck, type, *(uint32_t *)lck);
1808 * lock in question... we'll fake up a lock with the bits
1926 * time waiting for the lock to be released.
1951 * - its locked as a spin lock, and
1985 * penalize only lock groups that have debug/stats enabled