This is the mail archive of the libc-alpha@sourceware.cygnus.com 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]

[Pavel Krauz <xkr@nettest.dk>] cancel in ptherad_join patch



Hi,

I've found the following bug report.  Could somebody please look at
it?

Thanks,
Andreas



Topics:
   cancel in ptherad_join patch


----------------------------------------------------------------------

Date: Mon, 27 Mar 2000 09:58:56 +0200
From: Pavel Krauz <xkr@nettest.dk>
To: glibc-linux@ricardo.ecn.wfu.edu
Subject: cancel in ptherad_join patch
Message-Id: <38DF14C0.98AFECB6@nettest.dk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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




------------------------------

End of forwardIDG7j0 Digest
***************************



-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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