Author: davidxu Date: Fri Oct 29 07:04:45 2010 New Revision: 214500 URL: http://svn.freebsd.org/changeset/base/214500
Log: Remove local variable 'first', instead check signal number in memory, because the variable can be in register, second checking the variable may still return true, however this is unexpected. Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Fri Oct 29 02:12:36 2010 (r214499) +++ head/lib/libthr/thread/thr_sig.c Fri Oct 29 07:04:45 2010 (r214500) @@ -317,14 +317,11 @@ check_deferred_signal(struct pthread *cu ucontext_t uc; struct sigaction act; siginfo_t info; - volatile int first; if (__predict_true(curthread->deferred_siginfo.si_signo == 0)) return; - first = 1; getcontext(&uc); - if (first) { - first = 0; + if (curthread->deferred_siginfo.si_signo == 0) { act = curthread->deferred_sigact; uc.uc_sigmask = curthread->deferred_sigmask; memcpy(&info, &curthread->deferred_siginfo, sizeof(siginfo_t)); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"