From 8be6abcdc6d278b89e90980c3fc4d97c0301f9c9 Mon Sep 17 00:00:00 2001 From: David Xu Date: Sat, 25 Sep 2010 09:43:24 +0000 Subject: [PATCH] Only access unwind_disabled when _PTHREAD_FORCED_UNWIND is defined. --- lib/libthr/thread/thr_clean.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libthr/thread/thr_clean.c b/lib/libthr/thread/thr_clean.c index 71bd94a432d0..dc5b0c7ee17d 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;