aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-12 04:46:44 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-12 04:46:44 +0000
commitda63009e0f5ac74b33d8860a764d8103c5f60ec6 (patch)
tree2dc2cf509a272eb92e6566192719c37e36880c86 /nptl
parent1a82c8ffae3796e5527190440fb99d8016019cb8 (diff)
downloadglibc-da63009e0f5ac74b33d8860a764d8103c5f60ec6.tar
glibc-da63009e0f5ac74b33d8860a764d8103c5f60ec6.tar.gz
glibc-da63009e0f5ac74b33d8860a764d8103c5f60ec6.tar.bz2
glibc-da63009e0f5ac74b33d8860a764d8103c5f60ec6.zip
Update.
* Makefile (tests): Add tst-cleanup1. * tst-cleanup1.c: New file. * cancellation.c (__cleanup_thread): Removed. (__do_cancel): Remove call to __cleanup_thread. * pthreadP.h: Remove __cleanup_thread prorotype.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog6
-rw-r--r--nptl/Makefile1
-rw-r--r--nptl/cancellation.c41
-rw-r--r--nptl/pthreadP.h2
4 files changed, 7 insertions, 43 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index a6796211a0..c2a0347dd3 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,11 @@
2002-12-11 Ulrich Drepper <drepper@redhat.com>
+ * Makefile (tests): Add tst-cleanup1.
+ * tst-cleanup1.c: New file.
+ * cancellation.c (__cleanup_thread): Removed.
+ (__do_cancel): Remove call to __cleanup_thread.
+ * pthreadP.h: Remove __cleanup_thread prorotype.
+
* sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
Remember function and argument even if cancellation handler
function is not available.
diff --git a/nptl/Makefile b/nptl/Makefile
index 14ada1464d..57dd89f862 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -127,6 +127,7 @@ tests = tst-mutex1 tst-mutex2 tst-mutex3 tst-mutex4 tst-mutex5 tst-mutex6 \
tst-fork1 tst-fork2 tst-fork3 \
tst-atfork1 \
tst-cancel1 tst-cancel2 tst-cancel3 tst-cancel4 \
+ tst-cleanup1 \
tst-flock1 tst-flock2 \
tst-signal1 tst-signal2 tst-signal3 \
tst-exec1 tst-exec2 tst-exec3 \
diff --git a/nptl/cancellation.c b/nptl/cancellation.c
index 3cdc574880..0d0af1c647 100644
--- a/nptl/cancellation.c
+++ b/nptl/cancellation.c
@@ -42,9 +42,6 @@ __do_cancel (char *currentframe)
{
struct pthread *self = THREAD_SELF;
- /* Cleanup the thread-local storage. */
- __cleanup_thread (self, currentframe);
-
/* Throw an exception. */
// XXX TBI
@@ -55,44 +52,6 @@ __do_cancel (char *currentframe)
}
-void
-__cleanup_thread (struct pthread *self, char *currentframe)
-{
- struct _pthread_cleanup_buffer *cleanups;
-
- /* Call all registered cleanup handlers. */
- cleanups = THREAD_GETMEM (self, cleanup);
- if (__builtin_expect (cleanups != NULL, 0))
- {
- struct _pthread_cleanup_buffer *last;
-
- while (FRAME_LEFT (currentframe, cleanups))
- {
- last = cleanups;
- cleanups = cleanups->__prev;
-
- if (cleanups == NULL || FRAME_LEFT (last, cleanups))
- {
- cleanups = NULL;
- break;
- }
- }
-
- while (cleanups != NULL)
- {
- /* Call the registered cleanup function. */
- cleanups->__routine (cleanups->__arg);
-
- last = cleanups;
- cleanups = cleanups->__prev;
-
- if (FRAME_LEFT (last, cleanups))
- break;
- }
- }
-}
-
-
/* The next two functions are similar to pthread_setcanceltype() but
more specialized for the use in the cancelable functions like write().
They do not need to check parameters etc. */
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 4fba194108..1813a04583 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -88,8 +88,6 @@ extern int __pthread_debug attribute_hidden;
/* Function performing the cancellation. */
extern void __do_cancel (char *currentframe)
__attribute ((visibility ("hidden"), noreturn, regparm (1)));
-extern void __cleanup_thread (struct pthread *self, char *currentframe)
- __attribute ((visibility ("hidden"), regparm (2)));
/* Test whether stackframe is still active. */