This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
cancel in ptherad_join patch
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: cancel in ptherad_join patch
- From: Pavel Krauz <xkr at nettest dot dk>
- Date: Mon, 27 Mar 2000 09:58:56 +0200
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
Hello
Here is a patch that corrects a cancel bug in pthread_join that was
probably introduced with new extricated interface for cancel
regards
Pavel
--- join.c.bak Mon Mar 27 09:52:52 2000
+++ join.c Mon Mar 27 09:53:29 2000
@@ -130,11 +130,11 @@
if (! th->p_terminated) {
/* Register extrication interface */
__pthread_set_own_extricate_if(self, &extr);
- if (!(THREAD_GETMEM(self, p_canceled)
+ if ((THREAD_GETMEM(self, p_canceled)
&& THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE))
- th->p_joining = self;
- else
already_canceled = 1;
+ else
+ th->p_joining = self;
__pthread_unlock(&handle->h_lock);
if (already_canceled) {