diff options
author | julian <julian@FreeBSD.org> | 2002-09-29 23:04:34 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-09-29 23:04:34 +0000 |
commit | d91c37553eed3082a93a6edbef2fce6c7629aaf7 (patch) | |
tree | 511ef31f5693fdea87543a17c345986c726d9da3 /sys/kern/kern_mutex.c | |
parent | 054b6a1aae2b1225e80402c333f0e68b8fafe944 (diff) | |
download | FreeBSD-src-d91c37553eed3082a93a6edbef2fce6c7629aaf7.zip FreeBSD-src-d91c37553eed3082a93a6edbef2fce6c7629aaf7.tar.gz |
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
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r-- | sys/kern/kern_mutex.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |