Module Name:    src
Committed By:   bouyer
Date:           Wed Aug 22 20:59:47 UTC 2012

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

Log Message:
Pull up following revision(s) (requested by abs in ticket #1780):
        sys/arch/vax/include/cpu.h: revision 1.94 via patch
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.85 -r1.85.14.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.85 src/sys/arch/vax/include/cpu.h:1.85.14.1
--- src/sys/arch/vax/include/cpu.h:1.85	Tue Mar 11 05:34:02 2008
+++ src/sys/arch/vax/include/cpu.h	Wed Aug 22 20:59:47 2012
@@ -1,4 +1,4 @@
-/*      $NetBSD: cpu.h,v 1.85 2008/03/11 05:34:02 matt Exp $      */
+/*      $NetBSD: cpu.h,v 1.85.14.1 2012/08/22 20:59:47 bouyer Exp $      */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -165,7 +165,18 @@ extern int cpu_printfataltraps;
 #define	cpu_proc_fork(x, y)	do { } while (/*CONSCOND*/0)
 #define	cpu_lwp_free(l, f)	do { } while (/*CONSCOND*/0)
 #define	cpu_lwp_free2(l)	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