aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile4
-rw-r--r--nptl/pthreadP.h11
2 files changed, 15 insertions, 0 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 4544aa2..5bc4ad1 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -288,6 +288,10 @@ xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \
tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
test-srcs = tst-oddstacklimit
+# Test expected to fail on most targets (except x86_64) due to bug
+# 18435 - pthread_once hangs when init routine throws an exception.
+test-xfail-tst-once5 = yes
+
# Files which must not be linked with libpthread.
tests-nolibpthread = tst-unload
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 72d3e23..8cd51c6 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -537,8 +537,19 @@ extern void __pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer,
void (*routine) (void *), void *arg)
attribute_hidden;
+/* Replace cleanup macros defined in <pthread.h> with internal
+ versions that don't depend on unwind info and better support
+ cancellation. */
+# undef pthread_cleanup_push
+# define pthread_cleanup_push(routine,arg) \
+ { struct _pthread_cleanup_buffer _buffer; \
+ __pthread_cleanup_push (&_buffer, (routine), (arg));
+
extern void __pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer,
int execute) attribute_hidden;
+# undef pthread_cleanup_pop
+# define pthread_cleanup_pop(execute) \
+ __pthread_cleanup_pop (&_buffer, (execute)); }
#endif
extern void __pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer,