From d91c37553eed3082a93a6edbef2fce6c7629aaf7 Mon Sep 17 00:00:00 2001 From: julian Date: Sun, 29 Sep 2002 23:04:34 +0000 Subject: Implement basic KSE loaning. This stops a hread that is blocked in BOUND mode from stopping another thread from completing a syscall, and this allows it to release its resources etc. Probably more related commits to follow (at least one I know of) Initial concept by: julian, dillon Submitted by: davidxu --- sys/kern/kern_mutex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/kern/kern_mutex.c') diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 34cc6d5..a5053fe 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -762,7 +762,8 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line) td1->td_blocked = NULL; TD_CLR_MUTEX(td1); - setrunqueue(td1); + if (TD_CAN_RUN(td1)) + setrunqueue(td1); if (td->td_critnest == 1 && td1->td_priority < pri) { #ifdef notyet -- cgit v1.1