summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-09-25 09:43:24 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-09-25 09:43:24 +0000
commit6b8f97b12813cf038733bee39d12c57bc4905748 (patch)
tree199b612f0881c8be56655d066b86b8193f3051ad /lib/libthr/thread
parent09dabf65c879db81573d927dca0d5ad948619bca (diff)
downloadFreeBSD-src-6b8f97b12813cf038733bee39d12c57bc4905748.zip
FreeBSD-src-6b8f97b12813cf038733bee39d12c57bc4905748.tar.gz
Only access unwind_disabled when _PTHREAD_FORCED_UNWIND is defined.
Diffstat (limited to 'lib/libthr/thread')
-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