Date: Tue, 7 Feb 2012 19:23:08 +0000 (UTC) From: John Baldwin <jhb@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: r231150 - in stable/9/sys: i386/i386 mips/mips Message-ID: <201202071923.q17JN8o4003792@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202071923.q17JN8o4003792>