diff options
author | davidxu <davidxu@FreeBSD.org> | 2002-10-25 13:12:36 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2002-10-25 13:12:36 +0000 |
commit | 3f4f4ce1692fe9a30e8aa74190a75e1f59b34a80 (patch) | |
tree | 9cda12172161e574fd2f5c247b965bbce995de57 /sys/kern | |
parent | de4094aa3128816915ac063aac334ec900f5bf3e (diff) | |
download | FreeBSD-src-3f4f4ce1692fe9a30e8aa74190a75e1f59b34a80.zip FreeBSD-src-3f4f4ce1692fe9a30e8aa74190a75e1f59b34a80.tar.gz |
suspend thread only when it can be interrupted.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_kse.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_thread.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 2b4ad4a..0a1e485 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -1473,7 +1473,8 @@ thread_single(int force_exit) if (TD_IS_SUSPENDED(td2)) continue; /* maybe other inhibitted states too? */ - if (TD_IS_SLEEPING(td2)) + if (TD_IS_SLEEPING(td2) && + (td2->td_flags & TDF_SINTR)) thread_suspend_one(td2); } } diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 2b4ad4a..0a1e485 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -1473,7 +1473,8 @@ thread_single(int force_exit) if (TD_IS_SUSPENDED(td2)) continue; /* maybe other inhibitted states too? */ - if (TD_IS_SLEEPING(td2)) + if (TD_IS_SLEEPING(td2) && + (td2->td_flags & TDF_SINTR)) thread_suspend_one(td2); } } |