This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cancel in ptherad_join patch


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) {




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]