mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
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.
This commit is contained in:
@ -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) \
|
||||
|
Reference in New Issue
Block a user