diff options
Diffstat (limited to 'sys/kern/kern_umtx.c')
-rw-r--r-- | sys/kern/kern_umtx.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index bdae3e8..cf8c534 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -1588,20 +1588,15 @@ umtxq_sleep_pi(struct umtx_q *uq, struct umtx_pi *pi, umtxq_insert(uq); mtx_lock_spin(&umtx_lock); if (pi->pi_owner == NULL) { - /* XXX - * Current, We only support process private PI-mutex, - * we need a faster way to find an owner thread for - * process-shared mutex (not available yet). - */ mtx_unlock_spin(&umtx_lock); - PROC_LOCK(curproc); - td1 = thread_find(curproc, owner); + /* XXX Only look up thread in current process. */ + td1 = tdfind(owner, curproc->p_pid); mtx_lock_spin(&umtx_lock); if (td1 != NULL && pi->pi_owner == NULL) { uq1 = td1->td_umtxq; umtx_pi_setowner(pi, td1); } - PROC_UNLOCK(curproc); + PROC_UNLOCK(td1->td_proc); } TAILQ_FOREACH(uq1, &pi->pi_blocked, uq_lockq) { |