From owner-svn-src-all@FreeBSD.ORG Tue Feb 7 19:23:08 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 E2FF4106564A; Tue, 7 Feb 2012 19:23:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6E058FC13; Tue, 7 Feb 2012 19:23:08 +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 q17JN80S003795; Tue, 7 Feb 2012 19:23:08 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q17JN8o4003792; Tue, 7 Feb 2012 19:23:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201202071923.q17JN8o4003792@svn.freebsd.org> From: John Baldwin Date: Tue, 7 Feb 2012 19:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231150 - in stable/9/sys: i386/i386 mips/mips 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: Tue, 07 Feb 2012 19:23:09 -0000 Author: jhb Date: Tue Feb 7 19:23:08 2012 New Revision: 231150 URL: http://svn.freebsd.org/changeset/base/231150 Log: MFC 228962: Use curthread rather than PCPU_GET(curthread). 'curthread' uses special-case optimizations on several platforms and is preferred. Modified: stable/9/sys/i386/i386/sys_machdep.c stable/9/sys/mips/mips/gdb_machdep.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/modules/sound/driver/emu10k1/ (props changed) stable/9/sys/modules/sound/driver/emu10kx/ (props changed) stable/9/sys/modules/sound/driver/maestro3/ (props changed) Modified: stable/9/sys/i386/i386/sys_machdep.c ============================================================================== --- stable/9/sys/i386/i386/sys_machdep.c Tue Feb 7 19:14:13 2012 (r231149) +++ stable/9/sys/i386/i386/sys_machdep.c Tue Feb 7 19:23:08 2012 (r231150) @@ -549,7 +549,7 @@ user_ldt_free(struct thread *td) return; } - if (td == PCPU_GET(curthread)) { + if (td == curthread) { #ifdef XEN i386_reset_ldt(&default_proc_ldt); PCPU_SET(currentldt, (int)&default_proc_ldt); Modified: stable/9/sys/mips/mips/gdb_machdep.c ============================================================================== --- stable/9/sys/mips/mips/gdb_machdep.c Tue Feb 7 19:14:13 2012 (r231149) +++ stable/9/sys/mips/mips/gdb_machdep.c Tue Feb 7 19:23:08 2012 (r231150) @@ -116,7 +116,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz { *regsz = gdb_cpu_regsz(regnum); - if (kdb_thread == PCPU_GET(curthread)) { + if (kdb_thread == curthread) { register_t *zero_ptr = &kdb_frame->zero; return zero_ptr + regnum; } @@ -154,7 +154,7 @@ gdb_cpu_setreg(int regnum, void *val) switch (regnum) { case GDB_REG_PC: kdb_thrctx->pcb_context[10] = *(register_t *)val; - if (kdb_thread == PCPU_GET(curthread)) + if (kdb_thread == curthread) kdb_frame->pc = *(register_t *)val; } }