Date: Sat, 25 Sep 2010 04:21:31 +0000 (UTC) From: David Xu <davidxu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r213154 - head/lib/libthr/thread Message-ID: <201009250421.o8P4LVVh049174@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: davidxu Date: Sat Sep 25 04:21:31 2010 New Revision: 213154 URL: http://svn.freebsd.org/changeset/base/213154 Log: Simplify code, and in while loop, fix operator to match the unwinding direction. Modified: head/lib/libthr/thread/thr_exit.c Modified: head/lib/libthr/thread/thr_exit.c ============================================================================== --- head/lib/libthr/thread/thr_exit.c Sat Sep 25 01:57:47 2010 (r213153) +++ head/lib/libthr/thread/thr_exit.c Sat Sep 25 04:21:31 2010 (r213154) @@ -140,17 +140,14 @@ thread_unwind_stop(int version, _Unwind_ /* XXX assume stack grows down to lower address */ cfa = _Unwind_GetCFA(context); - if (actions & _UA_END_OF_STACK) { - done = 1; - } else if (cfa >= (uintptr_t)curthread->unwind_stackend) { + if (actions & _UA_END_OF_STACK || + cfa >= (uintptr_t)curthread->unwind_stackend) { done = 1; } while ((cur = curthread->cleanup) != NULL && - (done || - ((uintptr_t)cur < (uintptr_t)curthread->unwind_stackend && - (uintptr_t)cur >= cfa))) { - __pthread_cleanup_pop_imp(1); + (done || (uintptr_t)cur <= cfa)) { + __pthread_cleanup_pop_imp(1); } if (done)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009250421.o8P4LVVh049174>