mirror of git://sourceware.org/git/glibc.git
nptl: __libc_cleanup_push/__libc_cleanup_pop require -fexceptions
Do not define these macros if they do nothing in a particular compilation, otherwise they can easily be used accidentally, while not actually achieving anything.
This commit is contained in:
parent
e7b2a56192
commit
e81402f246
|
@ -271,6 +271,9 @@ extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer
|
|||
} else if (DOIT) \
|
||||
_buffer.__routine (_buffer.__arg)
|
||||
|
||||
/* __libc_cleanup_push and __libc_cleanup_pop depend on exception
|
||||
handling and stack unwinding. */
|
||||
#ifdef __EXCEPTIONS
|
||||
|
||||
/* Normal cleanup handling, based on C cleanup attribute. */
|
||||
__extern_inline void
|
||||
|
@ -290,7 +293,7 @@ __libc_cleanup_routine (struct __pthread_cleanup_frame *f)
|
|||
# define __libc_cleanup_pop(execute) \
|
||||
__clframe.__do_it = (execute); \
|
||||
} while (0)
|
||||
|
||||
#endif /* __EXCEPTIONS */
|
||||
|
||||
/* Create thread-specific key. */
|
||||
#define __libc_key_create(KEY, DESTRUCTOR) \
|
||||
|
|
Loading…
Reference in New Issue