Module Name: src
Committed By: ad
Date: Tue Dec 31 23:32:05 UTC 2019
Modified Files:
src/sys/rump/librump/rumpkern: vm.c
Log Message:
Fix rump.
To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/rump/librump/rumpkern/vm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.179 src/sys/rump/librump/rumpkern/vm.c:1.180
--- src/sys/rump/librump/rumpkern/vm.c:1.179 Tue Dec 31 13:07:13 2019
+++ src/sys/rump/librump/rumpkern/vm.c Tue Dec 31 23:32:05 2019
@@ -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 @@ uvm_availmem(void)
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;