Lines Matching refs:lock

80  * ID lock).  The former is used by semop, where a lookup is performed
92 * Avoiding a lock ordering violation between p_lock and the ID lock,
97 * sem_rmid, holding the ID lock, iterates through all undo structures
110 * takes the appropriate semaphore's ID lock (always legal since the
114 * semaphore, drops the ID lock, and frees the undo structure.
355 kmutex_t *lock;
378 if ((lock = ipc_lookup(sem_svc, semid,
382 mutex_exit(lock);
399 if ((lock = ipc_lookup(sem_svc, semid, (kipc_perm_t **)&sp)) == NULL) {
410 mutex_exit(lock);
414 mutex_exit(lock);
421 mutex_exit(lock);
431 mutex_exit(lock);
441 mutex_exit(lock);
445 mutex_exit(lock);
455 mutex_exit(lock);
464 mutex_exit(lock);
468 mutex_exit(lock);
472 mutex_exit(lock);
478 mutex_exit(lock);
482 mutex_exit(lock);
486 mutex_exit(lock);
492 mutex_exit(lock);
496 mutex_exit(lock);
500 mutex_exit(lock);
506 mutex_exit(lock);
517 mutex_exit(lock);
530 mutex_exit(lock);
534 mutex_exit(lock);
538 mutex_exit(lock);
544 mutex_exit(lock);
548 mutex_exit(lock);
552 mutex_exit(lock);
565 mutex_exit(lock);
591 mutex_exit(lock);
596 mutex_exit(lock);
668 kmutex_t *lock;
673 if (error = ipc_get(sem_svc, key, semflg, (kipc_perm_t **)&sp, &lock))
681 mutex_exit(lock);
690 mutex_exit(lock);
695 mutex_exit(lock);
726 lock = ipc_commit_end(sem_svc, &sp->sem_perm);
733 mutex_exit(lock);
806 sem_undo_alloc(proc_t *pp, ksemid_t *sp, kmutex_t **lock,
814 mutex_exit(*lock);
824 *lock = ipc_lock(sem_svc, sp->sem_perm.ipc_id);
866 kmutex_t *lock;
889 * lock. As a common use of timed semaphores is as an explicit
923 if ((lock = ipc_lookup(sem_svc, semid,
928 mutex_exit(lock);
933 mutex_exit(lock);
942 lock = ipc_lock(sem_svc, sp->sem_perm.ipc_id);
957 if ((lock = ipc_lookup(sem_svc, semid,
1004 if (error = sem_undo_alloc(pp, sp, &lock, &template,
1093 cvres = cv_waituntil_sig(&semp->semncnt_cv, lock,
1095 lock = ipc_relock(sem_svc, sp->sem_perm.ipc_id, lock);
1130 cvres = cv_waituntil_sig(&semp->semzcnt_cv, lock,
1132 lock = ipc_relock(sem_svc, sp->sem_perm.ipc_id, lock);
1163 mutex_exit(lock);
1177 mutex_exit(lock);