Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/macppc avoid races in mp_save_{fpu, vec}_proc...
details: https://anonhg.NetBSD.org/src/rev/e7e693275479
branches: trunk
changeset: 534899:e7e693275479
user: chs <chs%NetBSD.org@localhost>
date: Tue Aug 06 06:16:04 2002 +0000
description:
avoid races in mp_save_{fpu,vec}_proc() where the other CPU
dumps the state out from under us.
diffstat:
sys/arch/macppc/macppc/machdep.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 62c2ad51ba9a -r e7e693275479 sys/arch/macppc/macppc/machdep.c
--- a/sys/arch/macppc/macppc/machdep.c Tue Aug 06 06:14:33 2002 +0000
+++ b/sys/arch/macppc/macppc/machdep.c Tue Aug 06 06:16:04 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.117 2002/07/28 07:07:46 chs Exp $ */
+/* $NetBSD: machdep.c,v 1.118 2002/08/06 06:16:04 chs Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -697,6 +697,9 @@
*/
fpcpu = pcb->pcb_fpcpu;
+ if (fpcpu == NULL) {
+ return;
+ }
macppc_send_ipi(fpcpu, MACPPC_IPI_FLUSH_FPU);
/* Wait for flush. */
@@ -737,6 +740,9 @@
*/
veccpu = pcb->pcb_veccpu;
+ if (veccpu == NULL) {
+ return;
+ }
macppc_send_ipi(veccpu, MACPPC_IPI_FLUSH_VEC);
/* Wait for flush. */
Home |
Main Index |
Thread Index |
Old Index