Module Name:    src
Committed By:   pooka
Date:           Sat Apr 17 13:13:45 UTC 2010

Modified Files:
        src/sys/rump/librump/rumpkern: emul.c scheduler.c

Log Message:
Move scheduling related routines from emul.c to scheduler.c


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/librump/rumpkern/scheduler.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.126 src/sys/rump/librump/rumpkern/emul.c:1.127
--- src/sys/rump/librump/rumpkern/emul.c:1.126	Wed Apr 14 14:49:05 2010
+++ src/sys/rump/librump/rumpkern/emul.c	Sat Apr 17 13:13:45 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.126 2010/04/14 14:49:05 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.127 2010/04/17 13:13:45 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.126 2010/04/14 14:49:05 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.127 2010/04/17 13:13:45 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/null.h>
@@ -202,7 +202,7 @@
 	extern int hz;
 	int rv, error;
 	uint64_t sec, nsec;
-	
+
 	if (mtx)
 		mutex_exit(mtx);
 
@@ -220,13 +220,6 @@
 }
 
 void
-suspendsched(void)
-{
-
-	/* we don't control scheduling currently, can't do anything now */
-}
-
-void
 lwp_unsleep(lwp_t *l, bool cleanup)
 {
 
@@ -302,32 +295,6 @@
 }
 void (*delay_func)(unsigned int) = rump_delay;
 
-bool
-kpreempt(uintptr_t where)
-{
-
-	return false;
-}
-
-/*
- * There is no kernel thread preemption in rump currently.  But call
- * the implementing macros anyway in case they grow some side-effects
- * down the road.
- */
-void
-kpreempt_disable(void)
-{
-
-	KPREEMPT_DISABLE(curlwp);
-}
-
-void
-kpreempt_enable(void)
-{
-
-	KPREEMPT_ENABLE(curlwp);
-}
-
 void
 proc_sesshold(struct session *ss)
 {

Index: src/sys/rump/librump/rumpkern/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.9 src/sys/rump/librump/rumpkern/scheduler.c:1.10
--- src/sys/rump/librump/rumpkern/scheduler.c:1.9	Mon Jan 25 18:37:51 2010
+++ src/sys/rump/librump/rumpkern/scheduler.c	Sat Apr 17 13:13:45 2010
@@ -1,4 +1,4 @@
-/*      $NetBSD: scheduler.c,v 1.9 2010/01/25 18:37:51 pooka Exp $	*/
+/*      $NetBSD: scheduler.c,v 1.10 2010/04/17 13:13:45 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.9 2010/01/25 18:37:51 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.10 2010/04/17 13:13:45 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -38,6 +38,7 @@
 #include <sys/namei.h>
 #include <sys/queue.h>
 #include <sys/select.h>
+#include <sys/systm.h>
 
 #include <rump/rumpuser.h>
 
@@ -269,3 +270,39 @@
 
 	yield();
 }
+
+bool
+kpreempt(uintptr_t where)
+{
+
+	return false;
+}
+
+/*
+ * There is no kernel thread preemption in rump currently.  But call
+ * the implementing macros anyway in case they grow some side-effects
+ * down the road.
+ */
+void
+kpreempt_disable(void)
+{
+
+	KPREEMPT_DISABLE(curlwp);
+}
+
+void
+kpreempt_enable(void)
+{
+
+	KPREEMPT_ENABLE(curlwp);
+}
+
+void
+suspendsched(void)
+{
+
+	/*
+	 * Could wait until everyone is out and block further entries,
+	 * but skip that for now.
+	 */
+}

Reply via email to