Module Name:    src
Committed By:   riz
Date:           Thu Jul 12 17:07:38 UTC 2012

Modified Files:
        src/sys/arch/vax/include [netbsd-6]: cpu.h

Log Message:
Pull up following revision(s) (requested by abs in ticket #407):
        sys/arch/vax/include/cpu.h: revision 1.94
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.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.93.8.1 src/sys/arch/vax/include/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/vax/include/cpu.h
diff -u src/sys/arch/vax/include/cpu.h:1.93 src/sys/arch/vax/include/cpu.h:1.93.8.1
--- src/sys/arch/vax/include/cpu.h:1.93	Sun Jun  5 16:59:21 2011
+++ src/sys/arch/vax/include/cpu.h	Thu Jul 12 17:07:38 2012
@@ -1,4 +1,4 @@
-/*      $NetBSD: cpu.h,v 1.93 2011/06/05 16:59:21 matt Exp $      */
+/*      $NetBSD: cpu.h,v 1.93.8.1 2012/07/12 17:07:38 riz Exp $      */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -162,7 +162,18 @@ extern int cpu_printfataltraps;
 		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)
 {

Reply via email to