Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/kern Pull up revision 1.57 via patch (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/7082aa89e859
branches:  netbsd-2-0
changeset: 564727:7082aa89e859
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Mar 20 11:58:47 2005 +0000

description:
Pull up revision 1.57 via patch (requested by chs in ticket #1160):
define a new LWP flag which indicates that we're in the process of
doing a context switch.  use this on sparc and sparc64 to avoid trying
to access user memory (writing the register windows back to the stack)
in this case (since it's both unnecessary and wrong).

diffstat:

 sys/kern/kern_sa.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 41fed66554d8 -r 7082aa89e859 sys/kern/kern_sa.c
--- a/sys/kern/kern_sa.c        Sun Mar 20 11:58:39 2005 +0000
+++ b/sys/kern/kern_sa.c        Sun Mar 20 11:58:47 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sa.c,v 1.50.2.1 2004/07/10 13:54:25 tron Exp $    */
+/*     $NetBSD: kern_sa.c,v 1.50.2.2 2005/03/20 11:58:47 tron Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sa.c,v 1.50.2.1 2004/07/10 13:54:25 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sa.c,v 1.50.2.2 2005/03/20 11:58:47 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -799,7 +799,9 @@
 {
 
        if (l) {
+               l->l_flag |= L_SA_SWITCHING;
                getucontext(l, &ss->ss_captured.ss_ctx);
+               l->l_flag &= ~L_SA_SWITCHING;
                ss->ss_captured.ss_sa.sa_context = (ucontext_t *)
                    (intptr_t)((_UC_MACHINE_SP(&ss->ss_captured.ss_ctx) -
                        sizeof(ucontext_t))



Home | Main Index | Thread Index | Old Index