diff options
author | deischen <deischen@FreeBSD.org> | 2003-05-04 16:17:01 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2003-05-04 16:17:01 +0000 |
commit | ca059a5aeaae9d5813d714fca45f1aad81e33e85 (patch) | |
tree | 3d8c66d5e73ff5869e8a7e1754ef39d0b512e848 /lib/libpthread/thread/thr_suspend_np.c | |
parent | 03349278af97760ebfaacb5221dad9cb7aff9b88 (diff) | |
download | FreeBSD-src-ca059a5aeaae9d5813d714fca45f1aad81e33e85.zip FreeBSD-src-ca059a5aeaae9d5813d714fca45f1aad81e33e85.tar.gz |
Fix suspend and resume.
Submitted (in part) by: Kazuaki Oda <kaakun@highway.ne.jp>
Diffstat (limited to 'lib/libpthread/thread/thr_suspend_np.c')
-rw-r--r-- | lib/libpthread/thread/thr_suspend_np.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_suspend_np.c b/lib/libpthread/thread/thr_suspend_np.c index 7530dd0..4813de1 100644 --- a/lib/libpthread/thread/thr_suspend_np.c +++ b/lib/libpthread/thread/thr_suspend_np.c @@ -97,9 +97,10 @@ suspend_common(struct pthread *thread) (thread->state != PS_DEADLOCK) && ((thread->flags & THR_FLAGS_EXITING) == 0)) { thread->flags |= THR_FLAGS_SUSPENDED; - if ((thread->flags & THR_FLAGS_IN_RUNQ) != 0) + if ((thread->flags & THR_FLAGS_IN_RUNQ) != 0) { THR_RUNQ_REMOVE(thread); - THR_SET_STATE(thread, PS_SUSPENDED); + THR_SET_STATE(thread, PS_SUSPENDED); + } #ifdef NOT_YET if ((thread->attr.flags & PTHREAD_SCOPE_SYSTEM) != 0) /* ??? */ |