summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_clean.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_clean.c')
-rw-r--r--lib/libthr/thread/thr_clean.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_clean.c b/lib/libthr/thread/thr_clean.c
index 71bd94a..dc5b0c7 100644
--- a/lib/libthr/thread/thr_clean.c
+++ b/lib/libthr/thread/thr_clean.c
@@ -80,8 +80,9 @@ _pthread_cleanup_push(void (*routine) (void *), void *arg)
{
struct pthread *curthread = _get_curthread();
struct pthread_cleanup *newbuf;
-
+#ifdef _PTHREAD_FORCED_UNWIND
curthread->unwind_disabled = 1;
+#endif
if ((newbuf = (struct pthread_cleanup *)
malloc(sizeof(struct _pthread_cleanup_info))) != NULL) {
newbuf->routine = routine;
OpenPOWER on IntegriCloud