(__pthread_perform_cleanup): Call __rpc_thread_destroy.
authordrepper <drepper>
Tue, 20 Mar 2001 18:25:35 +0000 (18:25 +0000)
committerdrepper <drepper>
Tue, 20 Mar 2001 18:25:35 +0000 (18:25 +0000)
linuxthreads/cancel.c

index b05d8bf..0ae0d12 100644 (file)
@@ -15,6 +15,7 @@
 /* Thread cancellation */
 
 #include <errno.h>
+#include <rpc/rpc.h>
 #include "pthread.h"
 #include "internals.h"
 #include "spinlock.h"
@@ -163,6 +164,10 @@ void __pthread_perform_cleanup(void)
   struct _pthread_cleanup_buffer * c;
   for (c = THREAD_GETMEM(self, p_cleanup); c != NULL; c = c->__prev)
     c->__routine(c->__arg);
+
+  /* And the TSD which needs special help.  */
+  if (THREAD_GETMEM(self, p_libc_specific[_LIBC_TSD_KEY_RPC_VARS]) != NULL)
+    __rpc_thread_destroy ();
 }
 
 #ifndef SHARED