Pass vslock() and vsunlock() a proc *, rather than implicitly operating

on curproc.
This commit is contained in:
thorpej 1998-04-30 06:28:57 +00:00
parent 4df7fa2c39
commit 73863dd3c9
7 changed files with 31 additions and 27 deletions

View File

@ -300,7 +300,7 @@ fbdolock()
for (i = 0; i < segind; i++)
if (mseg[i].len && mseg[i].adrs && mseg[i].adrs
< (caddr_t)KERNBASE)
vslock(mseg[i].adrs, mseg[i].len);
vslock(curproc, mseg[i].adrs, mseg[i].len);
/* make map */
for (i = 0; i < segind; i++)
@ -316,7 +316,7 @@ fbunlock()
for (i = 0; i < segind; i++) {
if (mseg[i].len && mseg[i].adrs && mseg[i].adrs
< (caddr_t)KERNBASE) {
vsunlock(mseg[i].adrs, mseg[i].len, mseg[i].rw);
vsunlock(curproc, mseg[i].adrs, mseg[i].len, mseg[i].rw);
#if defined(mips) && defined(CPU_DOUBLE)
if (mseg[i].rw == B_READ)
clean_kudcache(curproc,

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_physio.c,v 1.30 1998/02/10 14:09:35 mrg Exp $ */
/* $NetBSD: kern_physio.c,v 1.31 1998/04/30 06:28:57 thorpej Exp $ */
/*-
* Copyright (c) 1994 Christopher G. Demetriou
@ -191,9 +191,9 @@ physio(strategy, bp, dev, flags, minphys, uio)
*/
PHOLD(p);
#if defined(UVM)
uvm_vslock(bp->b_data, todo);
uvm_vslock(p, bp->b_data, todo);
#else
vslock(bp->b_data, todo);
vslock(p, bp->b_data, todo);
#endif
vmapbuf(bp, todo);
@ -226,9 +226,9 @@ physio(strategy, bp, dev, flags, minphys, uio)
*/
vunmapbuf(bp, todo);
#if defined(UVM)
uvm_vsunlock(bp->b_data, todo);
uvm_vsunlock(p, bp->b_data, todo);
#else
vsunlock(bp->b_data, todo);
vsunlock(p, bp->b_data, todo);
#endif
PRELE(p);

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_sysctl.c,v 1.34 1998/03/01 02:22:30 fvdl Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.35 1998/04/30 06:28:58 thorpej Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@ -171,9 +171,9 @@ sys___sysctl(p, v, retval)
memlock.sl_lock = 1;
if (dolock)
#if defined(UVM)
uvm_vslock(SCARG(uap, old), oldlen);
uvm_vslock(p, SCARG(uap, old), oldlen);
#else
vslock(SCARG(uap, old), oldlen);
vslock(p, SCARG(uap, old), oldlen);
#endif
savelen = oldlen;
}
@ -182,9 +182,9 @@ sys___sysctl(p, v, retval)
if (SCARG(uap, old) != NULL) {
if (dolock)
#if defined(UVM)
uvm_vsunlock(SCARG(uap, old), savelen);
uvm_vsunlock(p, SCARG(uap, old), savelen);
#else
vsunlock(SCARG(uap, old), savelen);
vsunlock(p, SCARG(uap, old), savelen);
#endif
memlock.sl_lock = 0;
if (memlock.sl_want) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_extern.h,v 1.11 1998/03/30 06:24:42 mycroft Exp $ */
/* $NetBSD: uvm_extern.h,v 1.12 1998/04/30 06:28:59 thorpej Exp $ */
/*
* XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE!
@ -272,8 +272,8 @@ boolean_t uvm_kernacc __P((caddr_t, int, int));
__dead void uvm_scheduler __P((void)) __attribute__((noreturn));
void uvm_swapin __P((struct proc *));
boolean_t uvm_useracc __P((caddr_t, int, int));
void uvm_vslock __P((caddr_t, u_int));
void uvm_vsunlock __P((caddr_t, u_int));
void uvm_vslock __P((struct proc *, caddr_t, u_int));
void uvm_vsunlock __P((struct proc *, caddr_t, u_int));
/* uvm_init.c */

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_glue.c,v 1.8 1998/04/09 00:24:05 thorpej Exp $ */
/* $NetBSD: uvm_glue.c,v 1.9 1998/04/30 06:28:59 thorpej Exp $ */
/*
* XXXCDC: "ROUGH DRAFT" QUALITY UVM PRE-RELEASE FILE!
@ -223,11 +223,12 @@ uvm_chgkprot(addr, len, rw)
*/
void
uvm_vslock(addr, len)
uvm_vslock(p, addr, len)
struct proc *p;
caddr_t addr;
u_int len;
{
uvm_fault_wire(&curproc->p_vmspace->vm_map, trunc_page(addr),
uvm_fault_wire(&p->p_vmspace->vm_map, trunc_page(addr),
round_page(addr+len));
}
@ -239,7 +240,8 @@ uvm_vslock(addr, len)
*/
void
uvm_vsunlock(addr, len)
uvm_vsunlock(p, addr, len)
struct proc *p;
caddr_t addr;
u_int len;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_extern.h,v 1.35 1998/03/30 06:24:43 mycroft Exp $ */
/* $NetBSD: vm_extern.h,v 1.36 1998/04/30 06:28:58 thorpej Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -167,8 +167,8 @@ void vnode_pager_sync __P((struct mount *));
void vnode_pager_umount __P((struct mount *));
boolean_t vnode_pager_uncache __P((struct vnode *));
#if !defined(UVM)
void vslock __P((caddr_t, u_int));
void vsunlock __P((caddr_t, u_int));
void vslock __P((struct proc *, caddr_t, u_int));
void vsunlock __P((struct proc *, caddr_t, u_int));
#endif
/* Machine dependent portion */

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_glue.c,v 1.73 1998/04/09 00:23:39 thorpej Exp $ */
/* $NetBSD: vm_glue.c,v 1.74 1998/04/30 06:28:59 thorpej Exp $ */
/*
* Copyright (c) 1991, 1993
@ -173,20 +173,22 @@ chgkprot(addr, len, rw)
#endif
void
vslock(addr, len)
vslock(p, addr, len)
struct proc *p;
caddr_t addr;
u_int len;
{
vm_map_pageable(&curproc->p_vmspace->vm_map, trunc_page(addr),
vm_map_pageable(&p->p_vmspace->vm_map, trunc_page(addr),
round_page(addr+len), FALSE);
}
void
vsunlock(addr, len)
vsunlock(p, addr, len)
struct proc *p;
caddr_t addr;
u_int len;
{
vm_map_pageable(&curproc->p_vmspace->vm_map, trunc_page(addr),
vm_map_pageable(&p->p_vmspace->vm_map, trunc_page(addr),
round_page(addr+len), TRUE);
}