Source-Changes-HG archive

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

[src/trunk]: src In kthread_create(), pass the priority and cpu index down to...



details:   https://anonhg.NetBSD.org/src/rev/57b03ca4dc78
branches:  trunk
changeset: 786517:57b03ca4dc78
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Apr 30 13:29:28 2013 +0000

description:
In kthread_create(), pass the priority and cpu index down to the
rump kernel hypervisor (though the current implementation doesn't take
advantage of them).

diffstat:

 lib/librumpuser/rumpuser_pth.c       |  6 +++---
 lib/librumpuser/rumpuser_pth_dummy.c |  6 +++---
 sys/rump/include/rump/rumpuser.h     |  4 ++--
 sys/rump/librump/rumpkern/threads.c  |  7 ++++---
 4 files changed, 12 insertions(+), 11 deletions(-)

diffs (100 lines):

diff -r 44efea71fd49 -r 57b03ca4dc78 lib/librumpuser/rumpuser_pth.c
--- a/lib/librumpuser/rumpuser_pth.c    Tue Apr 30 12:39:20 2013 +0000
+++ b/lib/librumpuser/rumpuser_pth.c    Tue Apr 30 13:29:28 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser_pth.c,v 1.20 2013/04/30 12:39:20 pooka Exp $  */
+/*     $NetBSD: rumpuser_pth.c,v 1.21 2013/04/30 13:29:28 pooka Exp $  */
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_pth.c,v 1.20 2013/04/30 12:39:20 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_pth.c,v 1.21 2013/04/30 13:29:28 pooka Exp $");
 #endif /* !lint */
 
 #include <assert.h>
@@ -104,7 +104,7 @@
 
 int
 rumpuser_thread_create(void *(*f)(void *), void *arg, const char *thrname,
-       int joinable, void **ptcookie)
+       int joinable, int priority, int cpuidx, void **ptcookie)
 {
        pthread_t ptid;
        pthread_t *ptidp;
diff -r 44efea71fd49 -r 57b03ca4dc78 lib/librumpuser/rumpuser_pth_dummy.c
--- a/lib/librumpuser/rumpuser_pth_dummy.c      Tue Apr 30 12:39:20 2013 +0000
+++ b/lib/librumpuser/rumpuser_pth_dummy.c      Tue Apr 30 13:29:28 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser_pth_dummy.c,v 1.10 2013/04/27 16:32:58 pooka Exp $    */
+/*     $NetBSD: rumpuser_pth_dummy.c,v 1.11 2013/04/30 13:29:28 pooka Exp $    */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_pth_dummy.c,v 1.10 2013/04/27 16:32:58 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_pth_dummy.c,v 1.11 2013/04/30 13:29:28 pooka Exp $");
 #endif /* !lint */
 
 #include <sys/time.h>
@@ -82,7 +82,7 @@
 /*ARGSUSED*/
 int
 rumpuser_thread_create(void *(*f)(void *), void *arg, const char *thrname,
-       int joinable, void **tptr)
+       int joinable, int pri, int cpuidx, void **tptr)
 {
 
        fprintf(stderr, "rumpuser: threads not available\n");
diff -r 44efea71fd49 -r 57b03ca4dc78 sys/rump/include/rump/rumpuser.h
--- a/sys/rump/include/rump/rumpuser.h  Tue Apr 30 12:39:20 2013 +0000
+++ b/sys/rump/include/rump/rumpuser.h  Tue Apr 30 13:29:28 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser.h,v 1.98 2013/04/30 00:03:53 pooka Exp $      */
+/*     $NetBSD: rumpuser.h,v 1.99 2013/04/30 13:29:28 pooka Exp $      */
 
 /*
  * Copyright (c) 2007-2013 Antti Kantee.  All Rights Reserved.
@@ -160,7 +160,7 @@
  * threads, scheduling (host) and synchronization
  */
 int  rumpuser_thread_create(void *(*f)(void *), void *, const char *, int,
-                           void **);
+                           int, int, void **);
 void rumpuser_thread_exit(void) __dead;
 int  rumpuser_thread_join(void *);
 
diff -r 44efea71fd49 -r 57b03ca4dc78 sys/rump/librump/rumpkern/threads.c
--- a/sys/rump/librump/rumpkern/threads.c       Tue Apr 30 12:39:20 2013 +0000
+++ b/sys/rump/librump/rumpkern/threads.c       Tue Apr 30 13:29:28 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: threads.c,v 1.19 2013/04/27 16:32:57 pooka Exp $       */
+/*     $NetBSD: threads.c,v 1.20 2013/04/30 13:29:28 pooka Exp $       */
 
 /*
  * Copyright (c) 2007-2009 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.19 2013/04/27 16:32:57 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.20 2013/04/30 13:29:28 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -190,7 +190,8 @@
        }
                
        rv = rumpuser_thread_create(threadbouncer, k, thrname,
-           (flags & KTHREAD_MUSTJOIN) == KTHREAD_MUSTJOIN, &l->l_ctxlink);
+           (flags & KTHREAD_MUSTJOIN) == KTHREAD_MUSTJOIN,
+           pri, ci ? ci->ci_index : -1, &l->l_ctxlink);
        if (rv)
                return rv;
 



Home | Main Index | Thread Index | Old Index