From 7711a9b8e870372e19f6bea41a70baa0ea2878dd Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 6 Aug 2002 14:49:17 +0000 Subject: Several pthreads updates. Enable linuxthreads_db. Several fixes related to thread local storage. -Erik --- libpthread/linuxthreads/cancel.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libpthread/linuxthreads/cancel.c') diff --git a/libpthread/linuxthreads/cancel.c b/libpthread/linuxthreads/cancel.c index 8fd8c1e60..42484bb1e 100644 --- a/libpthread/linuxthreads/cancel.c +++ b/libpthread/linuxthreads/cancel.c @@ -14,11 +14,18 @@ /* Thread cancellation */ +#define __FORCE_GLIBC +#include #include #include "pthread.h" #include "internals.h" #include "spinlock.h" #include "restart.h" +#ifdef __UCLIBC_HAS_RPC__ +#include +extern void __rpc_thread_destroy(void); +#endif + int pthread_setcancelstate(int state, int * oldstate) { @@ -160,6 +167,12 @@ 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); + +#ifdef __UCLIBC_HAS_RPC__ + /* And the TSD which needs special help. */ + if (THREAD_GETMEM(self, p_libc_specific[_LIBC_TSD_KEY_RPC_VARS]) != NULL) + __rpc_thread_destroy (); +#endif } #ifndef PIC -- cgit v1.2.3