Mark a thread that is suspended while sleeping as interrupted.

This commit is contained in:
Jason Evans 2001-05-16 21:58:45 +00:00
parent 1848e3d448
commit 1317e200a8
3 changed files with 9 additions and 3 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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: