From owner-svn-src-all@FreeBSD.ORG Sat Feb 11 14:49:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE7011065670; Sat, 11 Feb 2012 14:49:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD50B8FC0C; Sat, 11 Feb 2012 14:49:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1BEnPov035388; Sat, 11 Feb 2012 14:49:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1BEnPqA035385; Sat, 11 Feb 2012 14:49:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201202111449.q1BEnPqA035385@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 11 Feb 2012 14:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231521 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2012 14:49:25 -0000 Author: kib Date: Sat Feb 11 14:49:25 2012 New Revision: 231521 URL: http://svn.freebsd.org/changeset/base/231521 Log: The PTRACESTOP() macro is used only once. Inline the only use and remove the macro. MFC after: 1 week Modified: head/sys/kern/subr_syscall.c head/sys/sys/ptrace.h Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Sat Feb 11 13:41:38 2012 (r231520) +++ head/sys/kern/subr_syscall.c Sat Feb 11 14:49:25 2012 (r231521) @@ -85,7 +85,11 @@ syscallenter(struct thread *td, struct s if (error == 0) { STOPEVENT(p, S_SCE, sa->narg); - PTRACESTOP_SC(p, td, S_PT_SCE); + if (p->p_flag & P_TRACED && p->p_stops & S_PT_SCE) { + PROC_LOCK(p); + ptracestop((td), SIGTRAP); + PROC_UNLOCK(p); + } if (td->td_dbgflags & TDB_USERWR) { /* * Reread syscall number and arguments if Modified: head/sys/sys/ptrace.h ============================================================================== --- head/sys/sys/ptrace.h Sat Feb 11 13:41:38 2012 (r231520) +++ head/sys/sys/ptrace.h Sat Feb 11 14:49:25 2012 (r231521) @@ -131,12 +131,6 @@ struct ptrace_vm_entry { #ifdef _KERNEL -#define PTRACESTOP_SC(p, td, flag) \ - if ((p)->p_flag & P_TRACED && (p)->p_stops & (flag)) { \ - PROC_LOCK(p); \ - ptracestop((td), SIGTRAP); \ - PROC_UNLOCK(p); \ - } /* * The flags below are used for ptrace(2) tracing and have no relation * to procfs. They are stored in struct proc's p_stops member.