Date: Fri, 29 Oct 2010 07:04:45 +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: r214500 - head/lib/libthr/thread Message-ID: <201010290704.o9T74j5r066900@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010290704.o9T74j5r066900>