summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2001-05-16 21:58:45 +0000
committerjasone <jasone@FreeBSD.org>2001-05-16 21:58:45 +0000
commit047f94e139274ab9ae2ec877bada1ddcc4756cc5 (patch)
tree5f174ebb7e0ef59e16faf874db483b39655152c9 /lib
parent295844e3ffd58cd9bc1c7f60f6c3baabbfb206b7 (diff)
downloadFreeBSD-src-047f94e139274ab9ae2ec877bada1ddcc4756cc5.zip
FreeBSD-src-047f94e139274ab9ae2ec877bada1ddcc4756cc5.tar.gz
Mark a thread that is suspended while sleeping as interrupted.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc_r/uthread/uthread_suspend_np.c4
-rw-r--r--lib/libkse/thread/thr_suspend_np.c4
-rw-r--r--lib/libpthread/thread/thr_suspend_np.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_suspend_np.c b/lib/libc_r/uthread/uthread_suspend_np.c
index 082f88b..81ee328 100644
--- a/lib/libc_r/uthread/uthread_suspend_np.c
+++ b/lib/libc_r/uthread/uthread_suspend_np.c
@@ -75,11 +75,13 @@ _pthread_suspend_np(pthread_t thread)
if ((thread->flags & PTHREAD_FLAGS_IN_WORKQ) != 0)
PTHREAD_WORKQ_REMOVE(thread);
_thread_seterrno(thread,EINTR);
+
+ /* FALLTHROUGH */
+ case PS_SLEEP_WAIT:
thread->interrupted = 1;
/* FALLTHROUGH */
case PS_SIGTHREAD:
- case PS_SLEEP_WAIT:
case PS_WAIT_WAIT:
case PS_SIGSUSPEND:
case PS_SIGWAIT:
diff --git a/lib/libkse/thread/thr_suspend_np.c b/lib/libkse/thread/thr_suspend_np.c
index 082f88b..81ee328 100644
--- a/lib/libkse/thread/thr_suspend_np.c
+++ b/lib/libkse/thread/thr_suspend_np.c
@@ -75,11 +75,13 @@ _pthread_suspend_np(pthread_t thread)
if ((thread->flags & PTHREAD_FLAGS_IN_WORKQ) != 0)
PTHREAD_WORKQ_REMOVE(thread);
_thread_seterrno(thread,EINTR);
+
+ /* FALLTHROUGH */
+ case PS_SLEEP_WAIT:
thread->interrupted = 1;
/* FALLTHROUGH */
case PS_SIGTHREAD:
- case PS_SLEEP_WAIT:
case PS_WAIT_WAIT:
case PS_SIGSUSPEND:
case PS_SIGWAIT:
diff --git a/lib/libpthread/thread/thr_suspend_np.c b/lib/libpthread/thread/thr_suspend_np.c
index 082f88b..81ee328 100644
--- a/lib/libpthread/thread/thr_suspend_np.c
+++ b/lib/libpthread/thread/thr_suspend_np.c
@@ -75,11 +75,13 @@ _pthread_suspend_np(pthread_t thread)
if ((thread->flags & PTHREAD_FLAGS_IN_WORKQ) != 0)
PTHREAD_WORKQ_REMOVE(thread);
_thread_seterrno(thread,EINTR);
+
+ /* FALLTHROUGH */
+ case PS_SLEEP_WAIT:
thread->interrupted = 1;
/* FALLTHROUGH */
case PS_SIGTHREAD:
- case PS_SLEEP_WAIT:
case PS_WAIT_WAIT:
case PS_SIGSUSPEND:
case PS_SIGWAIT:
OpenPOWER on IntegriCloud