Lines Matching refs:mutex
581 lck_mtx_t *mutex;
593 mutex = lck;
595 mutex = &lck->lck_mtx_ptr->lck_mtx;
606 if (mutex->lck_mtx_pri == 0)
609 if ( mutex->lck_mtx_pri < priority &&
620 if (mutex->lck_mtx_pri < priority)
621 mutex->lck_mtx_pri = priority;
623 self->pending_promoter[self->pending_promoter_index] = mutex;
624 mutex->lck_mtx_waiters++;
627 if (self->pending_promoter[self->pending_promoter_index] != mutex) {
628 self->pending_promoter[++self->pending_promoter_index] = mutex;
629 mutex->lck_mtx_waiters++;
633 lck_mtx_ilk_unlock(mutex);
658 * Invoked on acquiring the mutex when there is
670 lck_mtx_t *mutex;
673 mutex = lck;
675 mutex = &lck->lck_mtx_ptr->lck_mtx;
677 if (thread->pending_promoter[thread->pending_promoter_index] == mutex) {
681 mutex->lck_mtx_waiters--;
684 if (mutex->lck_mtx_waiters > 0) {
685 integer_t priority = mutex->lck_mtx_pri;
702 mutex->lck_mtx_pri = 0;
704 return (mutex->lck_mtx_waiters);
720 lck_mtx_t *mutex;
723 mutex = lck;
725 mutex = &lck->lck_mtx_ptr->lck_mtx;
728 panic("lck_mtx_unlock_wakeup: mutex %p holder %p\n", mutex, holder);
732 assert(mutex->lck_mtx_waiters > 0);
1034 void mutex_free_EXT(lck_mtx_t *mutex);
1035 void mutex_init_EXT(lck_mtx_t *mutex, __unused unsigned short tag);
1036 wait_result_t thread_sleep_mutex_EXT(event_t event, lck_mtx_t *mutex, wait_interrupt_t interruptible);
1037 wait_result_t thread_sleep_mutex_deadline_EXT(event_t event, lck_mtx_t *mutex, uint64_t deadline, wait_interrupt_t interruptible);
1155 lck_mtx_t *mutex)
1157 lck_mtx_free(mutex, &LockCompatGroup);
1162 lck_mtx_t *mutex,
1165 lck_mtx_init(mutex, &LockCompatGroup, LCK_ATTR_NULL);
1171 lck_mtx_t *mutex,
1174 return( lck_mtx_sleep(mutex, LCK_SLEEP_DEFAULT, event, interruptible));
1180 lck_mtx_t *mutex,
1184 return( lck_mtx_sleep_deadline(mutex, LCK_SLEEP_DEFAULT, event, interruptible, deadline));