From owner-svn-src-head@freebsd.org Mon Oct 16 20:11:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FD45E43F5E; Mon, 16 Oct 2017 20:11:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0B8A6B556; Mon, 16 Oct 2017 20:11:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9GKBUwk097282; Mon, 16 Oct 2017 20:11:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9GKBURo097281; Mon, 16 Oct 2017 20:11:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201710162011.v9GKBURo097281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 16 Oct 2017 20:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324669 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 324669 X-SVN-Commit-Repository: base 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.23 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, 16 Oct 2017 20:11:31 -0000 Author: kib Date: Mon Oct 16 20:11:29 2017 New Revision: 324669 URL: https://svnweb.freebsd.org/changeset/base/324669 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Oct 16 20:06:24 2017 (r324668) +++ head/sys/kern/kern_sig.c Mon Oct 16 20:11:29 2017 (r324669) @@ -2786,15 +2786,15 @@ issignal(struct thread *td) struct sigacts *ps; struct sigqueue *queue; sigset_t sigpending; - int sig, prop; ksiginfo_t ksi; + int prop, sig, traced; p = td->td_proc; ps = p->p_sigacts; mtx_assert(&ps->ps_mtx, MA_OWNED); PROC_LOCK_ASSERT(p, MA_OWNED); for (;;) { - int traced = (p->p_flag & P_TRACED) || (p->p_stops & S_SIG); + traced = (p->p_flag & P_TRACED) || (p->p_stops & S_SIG); sigpending = td->td_sigqueue.sq_signals; SIGSETOR(sigpending, p->p_sigqueue.sq_signals); @@ -2982,11 +2982,10 @@ thread_stopped(struct proc *p) * from the current set of pending signals. */ int -postsig(sig) - int sig; +postsig(int sig) { - struct thread *td = curthread; - struct proc *p = td->td_proc; + struct thread *td; + struct proc *p; struct sigacts *ps; sig_t action; ksiginfo_t ksi; @@ -2994,6 +2993,8 @@ postsig(sig) KASSERT(sig != 0, ("postsig")); + td = curthread; + p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); ps = p->p_sigacts; mtx_assert(&ps->ps_mtx, MA_OWNED); @@ -3010,7 +3011,7 @@ postsig(sig) ktrpsig(sig, action, td->td_pflags & TDP_OLDMASK ? &td->td_oldsigmask : &td->td_sigmask, ksi.ksi_code); #endif - if (p->p_stops & S_SIG) { + if ((p->p_stops & S_SIG) != 0) { mtx_unlock(&ps->ps_mtx); stopevent(p, S_SIG, sig); mtx_lock(&ps->ps_mtx);