summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-26 20:29:51 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-26 20:29:51 +0000
commit1be9867c3e45c64c48e6f050b30f7f5cd03c6eb3 (patch)
tree04648c8500313dc604639101abf71756aedbbd49 /sys/arch/i386
parentab136f3b0281b670e205bb6668de0216921c1ac4 (diff)
from netbsd; enable cpu_swapout(), which must save npx state
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/vm_machdep.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c
index 6adf2874c17..2b4452abf56 100644
--- a/sys/arch/i386/i386/vm_machdep.c
+++ b/sys/arch/i386/i386/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.55 1995/12/09 04:37:44 mycroft Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.56 1995/12/24 01:07:32 mycroft Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -156,6 +156,20 @@ cpu_set_kpc(p, pc)
sf->sf_esi = pc;
}
+void
+cpu_swapout(p)
+ struct proc *p;
+{
+
+#if NNPX > 0
+ /*
+ * Make sure we save the FP state before the user area vanishes.
+ */
+ if (npxproc == p)
+ npxsave();
+#endif
+}
+
/*
* cpu_exit is called as the last action during exit.
*