Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Remove unused call to savectx().



details:   https://anonhg.NetBSD.org/src/rev/c9d51bc67a2b
branches:  trunk
changeset: 464726:c9d51bc67a2b
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Oct 18 16:26:38 2019 +0000

description:
Remove unused call to savectx().

diffstat:

 sys/arch/x86/x86/vm_machdep.c |  16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diffs (40 lines):

diff -r 18af959f4547 -r c9d51bc67a2b sys/arch/x86/x86/vm_machdep.c
--- a/sys/arch/x86/x86/vm_machdep.c     Fri Oct 18 15:00:15 2019 +0000
+++ b/sys/arch/x86/x86/vm_machdep.c     Fri Oct 18 16:26:38 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_machdep.c,v 1.38 2019/10/12 06:31:04 maxv Exp $     */
+/*     $NetBSD: vm_machdep.c,v 1.39 2019/10/18 16:26:38 maxv Exp $     */
 
 /*-
  * Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.38 2019/10/12 06:31:04 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.39 2019/10/18 16:26:38 maxv Exp $");
 
 #include "opt_mtrr.h"
 
@@ -136,19 +136,11 @@
        struct switchframe *sf;
        vaddr_t uv;
 
+       KASSERT(l1 == curlwp || l1 == &lwp0);
+
        pcb1 = lwp_getpcb(l1);
        pcb2 = lwp_getpcb(l2);
 
-       /*
-        * Sync the PCB before we copy it.
-        */
-       if (l1 == curlwp) {
-               KASSERT(pcb1 == curpcb);
-               savectx(pcb1);
-       } else {
-               KASSERT(l1 == &lwp0);
-       }
-
        /* Copy the PCB from parent, except the FPU state. */
        memcpy(pcb2, pcb1, offsetof(struct pcb, pcb_savefpu));
 



Home | Main Index | Thread Index | Old Index