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 Fix rump.



details:   https://anonhg.NetBSD.org/src/rev/194c65a766d6
branches:  trunk
changeset: 466713:194c65a766d6
user:      ad <ad%NetBSD.org@localhost>
date:      Tue Dec 31 23:32:05 2019 +0000

description:
Fix rump.

diffstat:

 sys/rump/librump/rumpkern/vm.c |  39 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 37 insertions(+), 2 deletions(-)

diffs (60 lines):

diff -r edeecf00bd9c -r 194c65a766d6 sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Tue Dec 31 22:42:50 2019 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Tue Dec 31 23:32:05 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.179 2019/12/31 13:07:13 ad Exp $      */
+/*     $NetBSD: vm.c,v 1.180 2019/12/31 23:32:05 ad Exp $      */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.179 2019/12/31 13:07:13 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.180 2019/12/31 23:32:05 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -416,6 +416,41 @@
        return uvmexp.free;
 }
 
+void
+uvm_pagelock(struct vm_page *pg)
+{
+
+       mutex_enter(&pg->interlock);
+}
+
+void
+uvm_pagelock2(struct vm_page *pg1, struct vm_page *pg2)
+{
+
+       if (pg1 < pg2) {
+               mutex_enter(&pg1->interlock);
+               mutex_enter(&pg2->interlock);
+       } else {
+               mutex_enter(&pg2->interlock);
+               mutex_enter(&pg1->interlock);
+       }
+}
+
+void
+uvm_pageunlock(struct vm_page *pg)
+{
+
+       mutex_exit(&pg->interlock);
+}
+
+void
+uvm_pageunlock2(struct vm_page *pg1, struct vm_page *pg2)
+{
+
+       mutex_exit(&pg1->interlock);
+       mutex_exit(&pg2->interlock);
+}
+
 /* where's your schmonz now? */
 #define PUNLIMIT(a)    \
 p->p_rlimit[a].rlim_cur = p->p_rlimit[a].rlim_max = RLIM_INFINITY;



Home | Main Index | Thread Index | Old Index