Namespace rump-only kernel biglock routines appropriately.
No functional change.
This commit is contained in:
parent
fdeac1d7df
commit
a955550ec3
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: klock.c,v 1.1 2010/05/18 15:12:19 pooka Exp $ */
|
||||
/* $NetBSD: klock.c,v 1.2 2010/05/18 15:16:10 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: klock.c,v 1.1 2010/05/18 15:12:19 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: klock.c,v 1.2 2010/05/18 15:16:10 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -45,18 +45,18 @@ __KERNEL_RCSID(0, "$NetBSD: klock.c,v 1.1 2010/05/18 15:12:19 pooka Exp $");
|
|||
static volatile int lockcnt;
|
||||
|
||||
bool
|
||||
kernel_biglocked()
|
||||
rump_kernel_isbiglocked()
|
||||
{
|
||||
|
||||
return rumpuser_mutex_held(rump_giantlock) && lockcnt > 0;
|
||||
}
|
||||
|
||||
void
|
||||
kernel_unlock_allbutone(int *countp)
|
||||
rump_kernel_unlock_allbutone(int *countp)
|
||||
{
|
||||
int minusone = lockcnt-1;
|
||||
|
||||
KASSERT(kernel_biglocked());
|
||||
KASSERT(rump_kernel_isbiglocked());
|
||||
if (minusone) {
|
||||
_kernel_unlock(minusone, countp);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ kernel_unlock_allbutone(int *countp)
|
|||
}
|
||||
|
||||
void
|
||||
kernel_ununlock_allbutone(int nlocks)
|
||||
rump_kernel_ununlock_allbutone(int nlocks)
|
||||
{
|
||||
|
||||
KASSERT(rumpuser_mutex_held(rump_giantlock) && lockcnt == 0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ltsleep.c,v 1.25 2009/12/20 13:56:36 pooka Exp $ */
|
||||
/* $NetBSD: ltsleep.c,v 1.26 2010/05/18 15:16:10 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.25 2009/12/20 13:56:36 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.26 2010/05/18 15:16:10 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -62,7 +62,7 @@ sleeper(struct ltsleeper *ltsp, int timo)
|
|||
int rv, nlocks;
|
||||
|
||||
LIST_INSERT_HEAD(&sleepers, ltsp, entries);
|
||||
kernel_unlock_allbutone(&nlocks);
|
||||
rump_kernel_unlock_allbutone(&nlocks);
|
||||
|
||||
/* protected by biglock */
|
||||
if (timo) {
|
||||
|
@ -88,7 +88,7 @@ sleeper(struct ltsleeper *ltsp, int timo)
|
|||
|
||||
LIST_REMOVE(ltsp, entries);
|
||||
rumpuser_cv_destroy(ltsp->cv);
|
||||
kernel_ununlock_allbutone(nlocks);
|
||||
rump_kernel_ununlock_allbutone(nlocks);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ do_wakeup(wchan_t ident, void (*wakeupfn)(struct rumpuser_cv *))
|
|||
{
|
||||
struct ltsleeper *ltsp;
|
||||
|
||||
KASSERT(kernel_biglocked());
|
||||
KASSERT(rump_kernel_isbiglocked());
|
||||
LIST_FOREACH(ltsp, &sleepers, entries) {
|
||||
if (ltsp->id == ident) {
|
||||
wakeupfn(ltsp->cv);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rump_private.h,v 1.45 2010/05/18 14:58:42 pooka Exp $ */
|
||||
/* $NetBSD: rump_private.h,v 1.46 2010/05/18 15:16:10 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -123,9 +123,9 @@ void rump_user_unschedule(int, int *, void *);
|
|||
|
||||
void rump_cpu_attach(struct cpu_info *);
|
||||
|
||||
bool kernel_biglocked(void);
|
||||
void kernel_unlock_allbutone(int *);
|
||||
void kernel_ununlock_allbutone(int);
|
||||
bool rump_kernel_isbiglocked(void);
|
||||
void rump_kernel_unlock_allbutone(int *);
|
||||
void rump_kernel_ununlock_allbutone(int);
|
||||
|
||||
void rump_intr_init(void);
|
||||
void rump_softint_run(struct cpu_info *);
|
||||
|
|
Loading…
Reference in New Issue