From owner-svn-src-head@FreeBSD.ORG Mon Jun 3 04:22:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6A0A2180; Mon, 3 Jun 2013 04:22:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5B068170E; Mon, 3 Jun 2013 04:22:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r534MhVl004632; Mon, 3 Jun 2013 04:22:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r534MhYK004631; Mon, 3 Jun 2013 04:22:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201306030422.r534MhYK004631@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 Jun 2013 04:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251284 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jun 2013 04:22:43 -0000 Author: kib Date: Mon Jun 3 04:22:42 2013 New Revision: 251284 URL: http://svnweb.freebsd.org/changeset/base/251284 Log: Since the cause of the problems with the __fillcontextx() was identified, unify the code of check_deferred_signal() for all architectures, making the variant under #ifdef x86 common. Tested by: marius (sparc64) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Mon Jun 3 04:19:21 2013 (r251283) +++ head/lib/libthr/thread/thr_sig.c Mon Jun 3 04:22:42 2013 (r251284) @@ -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