View | Details | Raw Unified | Return to bug 192918
Collapse All | Expand All

(-)b/sys/kern/kern_umtx.c (-3 / +2 lines)
Lines 2072-2094 do_lock_pi(struct thread *td, struct umutex *m, uint32_t flags, Link Here
2072
		 * unlocking the umtx.
2072
		 * unlocking the umtx.
2073
		 */
2073
		 */
2074
		if (old == owner)
2074
		if (old == owner)
2075
			error = umtxq_sleep_pi(uq, pi, owner & ~UMUTEX_CONTESTED,
2075
			error = umtxq_sleep_pi(uq, pi, owner & ~UMUTEX_CONTESTED,
2076
			    "umtxpi", timeout == NULL ? NULL : &timo);
2076
			    "umtxpi", timeout == NULL ? NULL : &timo);
2077
		else {
2077
		else {
2078
			umtxq_unbusy(&uq->uq_key);
2078
			umtxq_unbusy(&uq->uq_key);
2079
			umtxq_unlock(&uq->uq_key);
2079
			umtxq_unlock(&uq->uq_key);
2080
		}
2080
		}
2081
2081
2082
		error = umtxq_check_susp(td);
2082
		if (error == 0)
2083
		if (error != 0)
2083
			error = umtxq_check_susp(td);
2084
			break;
2085
	}
2084
	}
2086
2085
2087
	umtxq_lock(&uq->uq_key);
2086
	umtxq_lock(&uq->uq_key);
2088
	umtx_pi_unref(pi);
2087
	umtx_pi_unref(pi);
2089
	umtxq_unlock(&uq->uq_key);
2088
	umtxq_unlock(&uq->uq_key);
2090
2089
2091
	umtx_key_release(&uq->uq_key);
2090
	umtx_key_release(&uq->uq_key);
2092
	return (error);
2091
	return (error);
2093
}
2092
}
2094
2093

Return to bug 192918