From a955550ec3d144c0247134a3f527e63e4c054f19 Mon Sep 17 00:00:00 2001 From: pooka Date: Tue, 18 May 2010 15:16:10 +0000 Subject: [PATCH] Namespace rump-only kernel biglock routines appropriately. No functional change. --- sys/rump/librump/rumpkern/klock.c | 12 ++++++------ sys/rump/librump/rumpkern/ltsleep.c | 10 +++++----- sys/rump/librump/rumpkern/rump_private.h | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/rump/librump/rumpkern/klock.c b/sys/rump/librump/rumpkern/klock.c index e038e76e5d7b..b4482d2e650f 100644 --- a/sys/rump/librump/rumpkern/klock.c +++ b/sys/rump/librump/rumpkern/klock.c @@ -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 -__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 #include @@ -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); diff --git a/sys/rump/librump/rumpkern/ltsleep.c b/sys/rump/librump/rumpkern/ltsleep.c index 977e80e9526a..280a48feb3a8 100644 --- a/sys/rump/librump/rumpkern/ltsleep.c +++ b/sys/rump/librump/rumpkern/ltsleep.c @@ -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 -__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 #include @@ -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); diff --git a/sys/rump/librump/rumpkern/rump_private.h b/sys/rump/librump/rumpkern/rump_private.h index 501c7f36d5c3..dd6ad33d210a 100644 --- a/sys/rump/librump/rumpkern/rump_private.h +++ b/sys/rump/librump/rumpkern/rump_private.h @@ -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 *);