Only access unwind_disabled when _PTHREAD_FORCED_UNWIND is defined.

This commit is contained in:
David Xu 2010-09-25 09:43:24 +00:00
parent d4d3e21865
commit 8be6abcdc6

View File

@ -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;