diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-11-07 16:49:35 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-11-07 16:49:35 +0000 |
commit | ece70a1400120c0e5678815423b62770be85bc62 (patch) | |
tree | 58401c1e15f97c3da083f837e64f59e6460ab4a9 /linuxthreads | |
parent | 632b6761c348150e018c42ee06265794668d9180 (diff) | |
download | glibc-ece70a1400120c0e5678815423b62770be85bc62.tar.gz glibc-ece70a1400120c0e5678815423b62770be85bc62.tar.xz glibc-ece70a1400120c0e5678815423b62770be85bc62.zip |
Update.
2000-11-07 Kazumoto Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/bits/setjmp.h: Move to... * sysdeps/sh/sh4/bits/setjmp.h: ...here. * sysdeps/sh/sh3/bits/setjmp.h: New file.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/cancel.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/linuxthreads/cancel.c b/linuxthreads/cancel.c index 40f9db5302..b05d8bf66e 100644 --- a/linuxthreads/cancel.c +++ b/linuxthreads/cancel.c @@ -55,6 +55,7 @@ int pthread_cancel(pthread_t thread) int dorestart = 0; pthread_descr th; pthread_extricate_if *pextricate; + int already_canceled; __pthread_lock(&handle->h_lock, NULL); if (invalid_handle(handle, thread)) { @@ -64,14 +65,15 @@ int pthread_cancel(pthread_t thread) th = handle->h_descr; - if (th->p_cancelstate == PTHREAD_CANCEL_DISABLE || th->p_canceled) { - th->p_canceled = 1; + already_canceled = th->p_canceled; + th->p_canceled = 1; + + if (th->p_cancelstate == PTHREAD_CANCEL_DISABLE || already_canceled) { __pthread_unlock(&handle->h_lock); return 0; } pextricate = th->p_extricate; - th->p_canceled = 1; pid = th->p_pid; /* If the thread has registered an extrication interface, then |