Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/vax add MD part of SA/pthread pagefault handlin...
details: https://anonhg.NetBSD.org/src/rev/81efb8d062ec
branches: trunk
changeset: 552100:81efb8d062ec
user: cl <cl%NetBSD.org@localhost>
date: Thu Sep 18 22:38:36 2003 +0000
description:
add MD part of SA/pthread pagefault handling on vax
diffstat:
sys/arch/vax/vax/trap.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (48 lines):
diff -r a5ac8f7da682 -r 81efb8d062ec sys/arch/vax/vax/trap.c
--- a/sys/arch/vax/vax/trap.c Thu Sep 18 22:37:38 2003 +0000
+++ b/sys/arch/vax/vax/trap.c Thu Sep 18 22:38:36 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.81 2003/07/15 02:15:06 lukem Exp $ */
+/* $NetBSD: trap.c,v 1.82 2003/09/18 22:38:36 cl Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -33,7 +33,7 @@
/* All bugs are subject to removal without further notice */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.81 2003/07/15 02:15:06 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.82 2003/09/18 22:38:36 cl Exp $");
#include "opt_ddb.h"
#include "opt_ktrace.h"
@@ -261,9 +261,14 @@
else
ftype = VM_PROT_READ;
- if (umode)
+ if (umode) {
KERNEL_PROC_LOCK(l);
- else
+ if (l->l_flag & L_SA) {
+ KDASSERT(p != NULL && p->p_sa != NULL);
+ p->p_sa->sa_vp_faultaddr = (vaddr_t)frame->code;
+ l->l_flag |= L_SA_PAGEFAULT;
+ }
+ } else
KERNEL_LOCK(LK_CANRECURSE|LK_EXCLUSIVE);
nss = 0;
@@ -303,9 +308,10 @@
if (nss != 0 && nss > vm->vm_ssize)
vm->vm_ssize = nss;
}
- if (umode)
+ if (umode) {
+ l->l_flag &= ~L_SA_PAGEFAULT;
KERNEL_PROC_UNLOCK(l);
- else
+ } else
KERNEL_UNLOCK();
break;
Home |
Main Index |
Thread Index |
Old Index