Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/ia64/ia64 hopefully fix deadlock issue in cpu_switc...
details: https://anonhg.NetBSD.org/src/rev/d443d7e38910
branches: trunk
changeset: 447606:d443d7e38910
user: scole <scole%NetBSD.org@localhost>
date: Fri Jan 18 18:03:06 2019 +0000
description:
hopefully fix deadlock issue in cpu_switchto. pointed out by <mrg> (Thanks!)
diffstat:
sys/arch/ia64/ia64/vm_machdep.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (40 lines):
diff -r ccdd206fc118 -r d443d7e38910 sys/arch/ia64/ia64/vm_machdep.c
--- a/sys/arch/ia64/ia64/vm_machdep.c Fri Jan 18 17:49:55 2019 +0000
+++ b/sys/arch/ia64/ia64/vm_machdep.c Fri Jan 18 18:03:06 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.15 2018/11/14 21:10:59 scole Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.16 2019/01/18 18:03:06 scole Exp $ */
/*
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -91,8 +91,9 @@
KASSERT(oldlwp == l);
swapctx(oldpcb, newpcb);
}
-
- return (oldlwp);
+
+ /* return oldlwp for the original thread that called cpu_switchto */
+ return ((lwp_t *)reg9);
}
/*
@@ -189,14 +190,13 @@
tf->tf_scratch.gr10 = 0;
}
+ pcb2->pcb_special.bspstore = ua2 + UAREA_BSPSTORE_OFFSET + ndirty;
+ pcb2->pcb_special.pfs = 0;
+ pcb2->pcb_special.sp = ua2 + UAREA_SP_OFFSET;
+ pcb2->pcb_special.rp = (unsigned long)FDESC_FUNC(lwp_trampoline);
tf->tf_scratch.gr2 = (unsigned long)FDESC_FUNC(func);
tf->tf_scratch.gr3 = (unsigned long)arg;
- pcb2->pcb_special.sp = ua2 + UAREA_SP_OFFSET;
- pcb2->pcb_special.rp = (unsigned long)FDESC_FUNC(lwp_trampoline);
- pcb2->pcb_special.bspstore = ua2 + UAREA_BSPSTORE_OFFSET + ndirty;
- pcb2->pcb_special.pfs = 0;
-
return;
}
Home |
Main Index |
Thread Index |
Old Index