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 rump rw_lock_op
details: https://anonhg.NetBSD.org/src/rev/ef6732159300
branches: trunk
changeset: 745099:ef6732159300
user: ad <ad%NetBSD.org@localhost>
date: Sat Feb 22 21:44:51 2020 +0000
description:
rump rw_lock_op
diffstat:
sys/rump/librump/rumpkern/locks.c | 11 +++++++++--
sys/rump/librump/rumpkern/locks_up.c | 10 ++++++++--
2 files changed, 17 insertions(+), 4 deletions(-)
diffs (63 lines):
diff -r 0a767e523355 -r ef6732159300 sys/rump/librump/rumpkern/locks.c
--- a/sys/rump/librump/rumpkern/locks.c Sat Feb 22 21:24:44 2020 +0000
+++ b/sys/rump/librump/rumpkern/locks.c Sat Feb 22 21:44:51 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locks.c,v 1.80 2018/02/05 05:00:48 ozaki-r Exp $ */
+/* $NetBSD: locks.c,v 1.81 2020/02/22 21:44:51 ad Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.80 2018/02/05 05:00:48 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.81 2020/02/22 21:44:51 ad Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -358,6 +358,13 @@
return rw_read_held(rw) || rw_write_held(rw);
}
+krw_t
+rw_lock_op(krwlock_t *rw)
+{
+
+ return rw_write_held(rw) ? RW_WRITER : RW_READER;
+}
+
/* curriculum vitaes */
#define RUMPCV(cv) (*(struct rumpuser_cv **)(cv))
diff -r 0a767e523355 -r ef6732159300 sys/rump/librump/rumpkern/locks_up.c
--- a/sys/rump/librump/rumpkern/locks_up.c Sat Feb 22 21:24:44 2020 +0000
+++ b/sys/rump/librump/rumpkern/locks_up.c Sat Feb 22 21:44:51 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locks_up.c,v 1.10 2016/01/26 23:12:17 pooka Exp $ */
+/* $NetBSD: locks_up.c,v 1.11 2020/02/22 21:44:51 ad Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: locks_up.c,v 1.10 2016/01/26 23:12:17 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks_up.c,v 1.11 2020/02/22 21:44:51 ad Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -317,6 +317,12 @@
return uprw->uprw_owner || uprw->uprw_readers;
}
+krw_t
+rw_lock_op(krwlock_t *rw)
+{
+
+ return rw_write_held(rw) ? RW_WRITER : RW_READER;
+}
/*
* Condvars are almost the same as in the MP case except that we
Home |
Main Index |
Thread Index |
Old Index