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).
This commit is contained in:
parent
be085dcd72
commit
c46eb786b4
@ -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;
|
||||
|
@ -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");
|
||||
|
@ -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, int, size_t *);
|
||||
* 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 *);
|
||||
|
||||
|
@ -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, struct cpu_info *ci,
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user