Revert previous commit. Come back vslock(), all is forgiven.

Pointy hat to:	bms
This commit is contained in:
Bruce M Simpson 2003-10-05 12:41:08 +00:00
parent d184af19f5
commit 5d264f84f3
2 changed files with 31 additions and 0 deletions

View file

@ -88,6 +88,8 @@ void vmspace_unshare(struct proc *);
void vmspace_free(struct vmspace *);
void vmspace_exitfree(struct proc *);
void vnode_pager_setsize(struct vnode *, vm_ooffset_t);
void vslock(void *, u_int);
void vsunlock(void *, u_int);
void vm_object_print(/* db_expr_t */ long, boolean_t, /* db_expr_t */ long,
char *);
int vm_fault_quick(caddr_t v, int prot);

View file

@ -179,6 +179,35 @@ useracc(addr, len, rw)
return (rv == TRUE);
}
/*
* MPSAFE
*/
void
vslock(addr, len)
void *addr;
u_int len;
{
vm_map_wire(&curproc->p_vmspace->vm_map, trunc_page((vm_offset_t)addr),
round_page((vm_offset_t)addr + len),
VM_MAP_WIRE_SYSTEM|VM_MAP_WIRE_NOHOLES);
}
/*
* MPSAFE
*/
void
vsunlock(addr, len)
void *addr;
u_int len;
{
vm_map_unwire(&curproc->p_vmspace->vm_map,
trunc_page((vm_offset_t)addr),
round_page((vm_offset_t)addr + len),
VM_MAP_WIRE_SYSTEM|VM_MAP_WIRE_NOHOLES);
}
/*
* Create the U area for a new process.
* This routine directly affects the fork perf for a process.