Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern qlock can now be a regular kernel ...
details: https://anonhg.NetBSD.org/src/rev/72ec790d3fd0
branches: trunk
changeset: 786842:72ec790d3fd0
user: pooka <pooka%NetBSD.org@localhost>
date: Wed May 15 12:49:33 2013 +0000
description:
qlock can now be a regular kernel spin mutex instead of a rumpuser mutex.
diffstat:
sys/rump/librump/rumpkern/ltsleep.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diffs (75 lines):
diff -r a554135838a8 -r 72ec790d3fd0 sys/rump/librump/rumpkern/ltsleep.c
--- a/sys/rump/librump/rumpkern/ltsleep.c Wed May 15 12:20:04 2013 +0000
+++ b/sys/rump/librump/rumpkern/ltsleep.c Wed May 15 12:49:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ltsleep.c,v 1.31 2013/04/28 13:37:52 pooka Exp $ */
+/* $NetBSD: ltsleep.c,v 1.32 2013/05/15 12:49:33 pooka Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.31 2013/04/28 13:37:52 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.32 2013/05/15 12:49:33 pooka Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -58,7 +58,7 @@
#define kcv u.kern
static LIST_HEAD(, ltsleeper) sleepers = LIST_HEAD_INITIALIZER(sleepers);
-static struct rumpuser_mtx *qlock;
+static kmutex_t *qlock;
static int
sleeper(wchan_t ident, int timo, kmutex_t *kinterlock)
@@ -76,9 +76,9 @@
rumpuser_cv_init(<s.ucv);
}
- rumpuser_mutex_enter_nowrap(qlock);
+ mutex_spin_enter(&qlock);
LIST_INSERT_HEAD(&sleepers, <s, entries);
- rumpuser_mutex_exit(qlock);
+ mutex_exit(&qlock);
if (timo) {
if (kinterlock) {
@@ -104,9 +104,9 @@
rv = 0;
}
- rumpuser_mutex_enter_nowrap(qlock);
+ mutex_spin_enter(&qlock);
LIST_REMOVE(<s, entries);
- rumpuser_mutex_exit(qlock);
+ mutex_exit(&qlock);
if (kinterlock)
cv_destroy(<s.kcv);
@@ -152,7 +152,7 @@
{
struct ltsleeper *ltsp;
- rumpuser_mutex_enter_nowrap(qlock);
+ mutex_spin_enter(&qlock);
LIST_FOREACH(ltsp, &sleepers, entries) {
if (ltsp->id == ident) {
if (ltsp->iskwait) {
@@ -162,12 +162,12 @@
}
}
}
- rumpuser_mutex_exit(qlock);
+ mutex_exit(&qlock);
}
void
rump_tsleep_init()
{
- rumpuser_mutex_init(&qlock, RUMPUSER_MTX_SPIN);
+ mutex_init(&qlock, MUTEX_SPIN, IPL_NONE);
}
Home |
Main Index |
Thread Index |
Old Index