Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern Move scheduling related routines f...



details:   https://anonhg.NetBSD.org/src/rev/d25ec9dc9258
branches:  trunk
changeset: 754034:d25ec9dc9258
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Apr 17 13:13:45 2010 +0000

description:
Move scheduling related routines from emul.c to scheduler.c

diffstat:

 sys/rump/librump/rumpkern/emul.c      |  39 ++------------------------------
 sys/rump/librump/rumpkern/scheduler.c |  41 +++++++++++++++++++++++++++++++++-
 2 files changed, 42 insertions(+), 38 deletions(-)

diffs (140 lines):

diff -r c9788b24a5f0 -r d25ec9dc9258 sys/rump/librump/rumpkern/emul.c
--- a/sys/rump/librump/rumpkern/emul.c  Sat Apr 17 13:10:02 2010 +0000
+++ b/sys/rump/librump/rumpkern/emul.c  Sat Apr 17 13:13:45 2010 +0000
@@ -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)
 {
diff -r c9788b24a5f0 -r d25ec9dc9258 sys/rump/librump/rumpkern/scheduler.c
--- a/sys/rump/librump/rumpkern/scheduler.c     Sat Apr 17 13:10:02 2010 +0000
+++ b/sys/rump/librump/rumpkern/scheduler.c     Sat Apr 17 13:13:45 2010 +0000
@@ -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.
+        */
+}



Home | Main Index | Thread Index | Old Index