Date: Mon, 17 Jun 2013 07:12:35 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r251834 - stable/9/lib/libthr/thread Message-ID: <201306170712.r5H7CZH8072575@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Jun 17 07:12:34 2013 New Revision: 251834 URL: http://svnweb.freebsd.org/changeset/base/251834 Log: MFC r251284: Unify the code of check_deferred_signal() for all architectures. Modified: stable/9/lib/libthr/thread/thr_sig.c Directory Properties: stable/9/lib/libthr/ (props changed) Modified: stable/9/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/9/lib/libthr/thread/thr_sig.c Mon Jun 17 07:11:17 2013 (r251833) +++ stable/9/lib/libthr/thread/thr_sig.c Mon Jun 17 07:12:34 2013 (r251834) @@ -318,31 +318,23 @@ check_deferred_signal(struct pthread *cu ucontext_t *uc; struct sigaction act; siginfo_t info; + int uc_len; if (__predict_true(curthread->deferred_siginfo.si_signo == 0)) return; -#if defined(__amd64__) || defined(__i386__) - int uc_len; uc_len = __getcontextx_size(); uc = alloca(uc_len); getcontext(uc); if (curthread->deferred_siginfo.si_signo == 0) return; __fillcontextx2((char *)uc); -#else - ucontext_t ucv; - uc = &ucv; - getcontext(uc); -#endif - 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)); - /* remove signal */ - curthread->deferred_siginfo.si_signo = 0; - handle_signal(&act, info.si_signo, &info, uc); - } + act = curthread->deferred_sigact; + uc->uc_sigmask = curthread->deferred_sigmask; + memcpy(&info, &curthread->deferred_siginfo, sizeof(siginfo_t)); + /* remove signal */ + curthread->deferred_siginfo.si_signo = 0; + handle_signal(&act, info.si_signo, &info, uc); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306170712.r5H7CZH8072575>