aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/sysdeps/pthread/bits
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-09-23 04:41:29 +0000
committerUlrich Drepper <drepper@redhat.com>2003-09-23 04:41:29 +0000
commit571f2090f876fee3eb99fd141d6595e6bc45549c (patch)
tree754b93812c920bb3c3a5e62e4c092d80baa74825 /linuxthreads/sysdeps/pthread/bits
parent365b16029b0a6645fac11ff61de21ca0d23d223f (diff)
downloadglibc-571f2090f876fee3eb99fd141d6595e6bc45549c.zip
glibc-571f2090f876fee3eb99fd141d6595e6bc45549c.tar.gz
glibc-571f2090f876fee3eb99fd141d6595e6bc45549c.tar.bz2
Update.
2003-09-22 Philip Blundell <philb@gnu.org> * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop. * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Likewise. * pthread.c (__pthread_elements): Initialise these new elements. * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use __libc_maybe_call. (__libc_cleanup_pop): Likewise.
Diffstat (limited to 'linuxthreads/sysdeps/pthread/bits')
-rw-r--r--linuxthreads/sysdeps/pthread/bits/libc-lock.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/linuxthreads/sysdeps/pthread/bits/libc-lock.h b/linuxthreads/sysdeps/pthread/bits/libc-lock.h
index c0d0deb..7e22166 100644
--- a/linuxthreads/sysdeps/pthread/bits/libc-lock.h
+++ b/linuxthreads/sysdeps/pthread/bits/libc-lock.h
@@ -265,18 +265,12 @@ typedef pthread_key_t __libc_key_t;
}
#define __libc_cleanup_push(fct, arg) \
- { struct _pthread_cleanup_buffer _buffer; \
- int _avail = _pthread_cleanup_push != NULL; \
- if (_avail) { \
- _pthread_cleanup_push (&_buffer, (fct), (arg)); \
- }
+ { struct _pthread_cleanup_buffer _buffer; \
+ __libc_maybe_call (_pthread_cleanup_push, (&_buffer, (fct), (arg)), 0)
#define __libc_cleanup_pop(execute) \
- if (_avail) { \
- _pthread_cleanup_pop (&_buffer, execute); \
- } \
- }
-
+ __libc_maybe_call (_pthread_cleanup_pop, (&_buffer, execute), 0); \
+ }
/* Create thread-specific key. */
#define __libc_key_create(KEY, DESTRUCTOR) \