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: initialize pg->interlock



details:   https://anonhg.NetBSD.org/src/rev/a20788853cf7
branches:  trunk
changeset: 466809:a20788853cf7
user:      ad <ad%NetBSD.org@localhost>
date:      Thu Jan 02 16:56:58 2020 +0000

description:
rump: initialize pg->interlock

diffstat:

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

diffs (34 lines):

diff -r d51a23bbdb00 -r a20788853cf7 sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Thu Jan 02 16:53:05 2020 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Thu Jan 02 16:56:58 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.180 2019/12/31 23:32:05 ad Exp $      */
+/*     $NetBSD: vm.c,v 1.181 2020/01/02 16:56:58 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.180 2019/12/31 23:32:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.181 2020/01/02 16:56:58 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -167,6 +167,7 @@
        if (__predict_false(pg == NULL)) {
                return NULL;
        }
+       mutex_init(&pg->interlock, MUTEX_DEFAULT, IPL_NONE);
 
        pg->offset = off;
        pg->uobject = uobj;
@@ -226,6 +227,7 @@
                atomic_dec_uint(&vmpage_onqueue);
        }
 
+       mutex_destroy(&pg->interlock);
        pool_cache_put(&pagecache, pg);
 }
 



Home | Main Index | Thread Index | Old Index