Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/include Change cpu_idle to be an inline which s...
details: https://anonhg.NetBSD.org/src/rev/eb3bb1a2ada9
branches: trunk
changeset: 777643:eb3bb1a2ada9
user: matt <matt%NetBSD.org@localhost>
date: Mon Feb 27 15:50:48 2012 +0000
description:
Change cpu_idle to be an inline which sets IPL to 1 and then back to 0
so simh can recognize the kernel is idle.
diffstat:
sys/arch/vax/include/cpu.h | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 20e9e3082702 -r eb3bb1a2ada9 sys/arch/vax/include/cpu.h
--- a/sys/arch/vax/include/cpu.h Mon Feb 27 15:47:11 2012 +0000
+++ b/sys/arch/vax/include/cpu.h Mon Feb 27 15:50:48 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.93 2011/06/05 16:59:21 matt Exp $ */
+/* $NetBSD: cpu.h,v 1.94 2012/02/27 15:50:48 matt Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -162,7 +162,18 @@
mtpr(AST_OK,PR_ASTLVL); \
} while (/*CONSTCOND*/ 0)
#define cpu_proc_fork(x, y) do { } while (/*CONSCOND*/0)
-#define cpu_idle() do { } while (/*CONSCOND*/0)
+
+/*
+ * This allows SIMH to recognize the kernel wants to sleep.
+ */
+static inline void
+cpu_idle(void)
+{
+ int ipl = mfpr(PR_IPL);
+ mtpr(1, PR_IPL);
+ mtpr(ipl, PR_IPL);
+}
+
static inline bool
cpu_intr_p(void)
{
Home |
Main Index |
Thread Index |
Old Index