Module Name:    src
Committed By:   pooka
Date:           Tue Apr 30 13:29:29 UTC 2013

Modified Files:
        src/lib/librumpuser: rumpuser_pth.c rumpuser_pth_dummy.c
        src/sys/rump/include/rump: rumpuser.h
        src/sys/rump/librump/rumpkern: threads.c

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/librumpuser/rumpuser_pth.c
cvs rdiff -u -r1.10 -r1.11 src/lib/librumpuser/rumpuser_pth_dummy.c
cvs rdiff -u -r1.98 -r1.99 src/sys/rump/include/rump/rumpuser.h
cvs rdiff -u -r1.19 -r1.20 src/sys/rump/librump/rumpkern/threads.c

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

Modified files:

Index: src/lib/librumpuser/rumpuser_pth.c
diff -u src/lib/librumpuser/rumpuser_pth.c:1.20 src/lib/librumpuser/rumpuser_pth.c:1.21
--- src/lib/librumpuser/rumpuser_pth.c:1.20	Tue Apr 30 12:39:20 2013
+++ src/lib/librumpuser/rumpuser_pth.c	Tue Apr 30 13:29:28 2013
@@ -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 @@ rumpuser__thrinit(void)
 
 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;

Index: src/lib/librumpuser/rumpuser_pth_dummy.c
diff -u src/lib/librumpuser/rumpuser_pth_dummy.c:1.10 src/lib/librumpuser/rumpuser_pth_dummy.c:1.11
--- src/lib/librumpuser/rumpuser_pth_dummy.c:1.10	Sat Apr 27 16:32:58 2013
+++ src/lib/librumpuser/rumpuser_pth_dummy.c	Tue Apr 30 13:29:28 2013
@@ -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 @@ rumpuser_biothread(void *arg)
 /*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");

Index: src/sys/rump/include/rump/rumpuser.h
diff -u src/sys/rump/include/rump/rumpuser.h:1.98 src/sys/rump/include/rump/rumpuser.h:1.99
--- src/sys/rump/include/rump/rumpuser.h:1.98	Tue Apr 30 00:03:53 2013
+++ src/sys/rump/include/rump/rumpuser.h	Tue Apr 30 13:29:28 2013
@@ -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 @@ int rumpuser_getrandom(void *, size_t, i
  * 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 *);
 

Index: src/sys/rump/librump/rumpkern/threads.c
diff -u src/sys/rump/librump/rumpkern/threads.c:1.19 src/sys/rump/librump/rumpkern/threads.c:1.20
--- src/sys/rump/librump/rumpkern/threads.c:1.19	Sat Apr 27 16:32:57 2013
+++ src/sys/rump/librump/rumpkern/threads.c	Tue Apr 30 13:29:28 2013
@@ -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 @@ kthread_create(pri_t pri, int flags, str
 	}
 		
 	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;
 

Reply via email to