diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-04-12 08:38:14 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-04-12 08:38:14 +0000 |
commit | 68107ec092e7cc3fcd1f56edf9da8085cffed00d (patch) | |
tree | 4297addf21ce4bc6d324a145ecacaf7920b336d4 /nptl/unwind.c | |
parent | 09d65ff393e9183eecba1e5cb877e95dbdd3d4a4 (diff) | |
download | glibc-68107ec092e7cc3fcd1f56edf9da8085cffed00d.tar.gz glibc-68107ec092e7cc3fcd1f56edf9da8085cffed00d.tar.xz glibc-68107ec092e7cc3fcd1f56edf9da8085cffed00d.zip |
Update.
* sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
Diffstat (limited to 'nptl/unwind.c')
-rw-r--r-- | nptl/unwind.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/nptl/unwind.c b/nptl/unwind.c index 46c896d5b3..7529174d5a 100644 --- a/nptl/unwind.c +++ b/nptl/unwind.c @@ -69,28 +69,32 @@ __pthread_unwind (__pthread_unwind_buf_t *buf) struct _pthread_cleanup_buffer *oldp = ibuf->priv.data.cleanup; struct _pthread_cleanup_buffer *curp = THREAD_GETMEM (self, cleanup); - while (curp != oldp) + if (curp != oldp) { - /* Pointer to the next element. */ - struct _pthread_cleanup_buffer *nextp = curp->__prev; + do + { + /* Pointer to the next element. */ + struct _pthread_cleanup_buffer *nextp = curp->__prev; - /* Call the handler. */ - curp->__routine (curp->__arg); + /* Call the handler. */ + curp->__routine (curp->__arg); - /* To the next. */ - curp = nextp; - } + /* To the next. */ + curp = nextp; + } + while (curp != oldp); - /* Mark the current element as handled. */ - THREAD_SETMEM (self, cleanup, curp); + /* Mark the current element as handled. */ + THREAD_SETMEM (self, cleanup, curp); + } #ifdef HAVE_FORCED_UNWIND /* This is not a catchable exception, so don't provide any details about the exception type. We do need to initialize the field though. */ - ibuf->priv.data.exc.exception_class = 0; - ibuf->priv.data.exc.exception_cleanup = unwind_cleanup; + THREAD_SETMEM (self, exc.exception_class, 0); + THREAD_SETMEM (self, exc.exception_cleanup, unwind_cleanup); - _Unwind_ForcedUnwind (&ibuf->priv.data.exc, unwind_stop, ibuf); + _Unwind_ForcedUnwind (&self->exc, unwind_stop, ibuf); #else /* We simply jump to the registered setjmp buffer. */ __libc_longjmp ((struct __jmp_buf_tag *) ibuf->cancel_jmp_buf, 1); |