diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2000-03-15 13:59:27 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2000-03-15 13:59:27 +0000 |
| commit | 1d013a86edb866de00bf57761c845388c8d9a467 (patch) | |
| tree | 935feb03e56c674b055ccf5f23861c18e476211a /lib/libpthread/thread/thr_cancel.c | |
| parent | 8d548e1f88b83ea07e628bc6ddb7144ee8379bcd (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_cancel.c')
| -rw-r--r-- | lib/libpthread/thread/thr_cancel.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_cancel.c b/lib/libpthread/thread/thr_cancel.c index f22bfb55972d..82ddbb8b6565 100644 --- a/lib/libpthread/thread/thr_cancel.c +++ b/lib/libpthread/thread/thr_cancel.c @@ -37,6 +37,15 @@ pthread_cancel(pthread_t pthread) pthread->cancelflags |= PTHREAD_CANCELLING; break; + case PS_SUSPENDED: + /* + * This thread isn't in any scheduling + * queues; just change it's state: + */ + pthread->cancelflags |= PTHREAD_CANCELLING; + PTHREAD_SET_STATE(pthread, PS_RUNNING); + break; + case PS_SPINBLOCK: case PS_FDR_WAIT: case PS_FDW_WAIT: @@ -52,7 +61,6 @@ pthread_cancel(pthread_t pthread) case PS_WAIT_WAIT: case PS_SIGSUSPEND: case PS_SIGWAIT: - case PS_SUSPENDED: /* Interrupt and resume: */ pthread->interrupted = 1; pthread->cancelflags |= PTHREAD_CANCELLING; |
