In uvm_anon_init() and uvm_anon_add(), initialize the ref count lock.
This commit is contained in:
parent
2f76dd5371
commit
7c367407aa
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uvm_anon.c,v 1.2 1999/03/26 17:34:15 chs Exp $ */
|
||||
/* $NetBSD: uvm_anon.c,v 1.3 1999/08/14 06:25:48 ross Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -77,6 +77,7 @@ uvm_anon_init()
|
||||
for (lcv = 0 ; lcv < nanon ; lcv++) {
|
||||
anon[lcv].u.an_nxt = uvm.afree;
|
||||
uvm.afree = &anon[lcv];
|
||||
simple_lock_init(&uvm.afree->an_lock);
|
||||
}
|
||||
simple_lock_init(&uvm.afreelock);
|
||||
}
|
||||
@ -109,6 +110,7 @@ uvm_anon_add(pages)
|
||||
simple_lock_init(&anon->an_lock);
|
||||
anon[lcv].u.an_nxt = uvm.afree;
|
||||
uvm.afree = &anon[lcv];
|
||||
simple_lock_init(&uvm.afree->an_lock);
|
||||
}
|
||||
simple_unlock(&uvm.afreelock);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user