Lines Matching refs:mutex

1794  * that mutex->lck_mtx_waiters != 0 or 
1795 * that mutex->lck_mtx_promoted != 0...
1797 * neither the mutex or interlock is held
1801 lck_mtx_t *mutex,
1815 mutex, fake_lck.lck_mtx_promoted, fake_lck.lck_mtx_waiters, fake_lck.lck_mtx_pri, 0);
1820 thread_wakeup_one_with_pri((event_t)(((unsigned int*)mutex)+(sizeof(lck_mtx_t)-1)/sizeof(unsigned int)), fake_lck.lck_mtx_pri);
1822 thread_wakeup_one((event_t)(((unsigned int*)mutex)+(sizeof(lck_mtx_t)-1)/sizeof(unsigned int)));
1843 thread->sched_pri, DEPRESSPRI, 0, mutex, 0);
1850 thread->sched_pri, thread->priority, 0, mutex, 0);
1861 mutex, 0, mutex->lck_mtx_waiters, 0, 0);
1868 * Invoked on acquiring the mutex when there is
1870 * that mutex->lck_mtx_waiters != 0 or
1873 * mutex is owned... interlock is held... preemption is disabled
1877 lck_mtx_t *mutex)
1884 mutex, thread->was_promoted_on_wakeup, mutex->lck_mtx_waiters, mutex->lck_mtx_pri, 0);
1886 if (mutex->lck_mtx_waiters)
1887 priority = mutex->lck_mtx_pri;
1891 thread = (thread_t)mutex->lck_mtx_owner; /* faster then current_thread() */
1896 thread->sched_pri, priority, thread->was_promoted_on_wakeup, mutex, 0);
1904 if (mutex->lck_mtx_promoted == 0) {
1905 mutex->lck_mtx_promoted = 1;
1916 mutex, 0, mutex->lck_mtx_waiters, 0, 0);
1924 * Invoked trying to acquire a mutex when there is contention but
1929 * returns 0 if mutex acquired
1935 lck_mtx_t *mutex)
1944 mutex, mutex->lck_mtx_owner, mutex->lck_mtx_waiters, 0, 0);
1950 * - mutex is locked, and
1957 if (__probable(lck_mtx_lock_grab_mutex(mutex))) {
1961 if ((holder = (thread_t) mutex->lck_mtx_owner) != NULL) {
1984 * this is a direct or indirect mutex. This allows us to
1988 if (__probable(mutex->lck_mtx_is_ext == 0)) {
1989 LOCKSTAT_RECORD(LS_LCK_MTX_LOCK_SPIN, mutex,
1992 LOCKSTAT_RECORD(LS_LCK_MTX_EXT_LOCK_SPIN, mutex,
1999 mutex, mutex->lck_mtx_owner, mutex->lck_mtx_waiters, retval, 0);
2017 lck_mtx_t *mutex)
2031 mutex, mutex->lck_mtx_owner, mutex->lck_mtx_waiters, mutex->lck_mtx_pri, 0);
2040 if (mutex->lck_mtx_waiters == 0 || priority > mutex->lck_mtx_pri)
2041 mutex->lck_mtx_pri = priority;
2042 mutex->lck_mtx_waiters++;
2044 if ( (holder = (thread_t)mutex->lck_mtx_owner) &&
2045 holder->sched_pri < mutex->lck_mtx_pri ) {
2050 if (holder->sched_pri < mutex->lck_mtx_pri) {
2053 holder->sched_pri, priority, thread_tid(holder), mutex, 0);
2057 if (mutex->lck_mtx_promoted == 0) {
2061 mutex->lck_mtx_promoted = 1;
2067 assert_wait((event_t)(((unsigned int*)mutex)+((sizeof(lck_mtx_t)-1)/sizeof(unsigned int))), THREAD_UNINT);
2069 lck_mtx_ilk_unlock(mutex);
2074 mutex, mutex->lck_mtx_owner, mutex->lck_mtx_waiters, mutex->lck_mtx_pri, 0);
2082 if (mutex->lck_mtx_is_ext == 0) {
2083 LOCKSTAT_RECORD(LS_LCK_MTX_LOCK_BLOCK, mutex,
2086 LOCKSTAT_RECORD(LS_LCK_MTX_EXT_LOCK_BLOCK, mutex,