1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

Merge all the various copies of vm_fault_quick() into a single

portable copy.
This commit is contained in:
Matthew Dillon 2003-01-16 00:02:21 +00:00
parent f597900329
commit e3669cee72
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109342
8 changed files with 18 additions and 113 deletions

View File

@ -96,22 +96,6 @@
#include <sys/user.h>
/*
* quick version of vm_fault
*/
int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
int r;
if (prot & VM_PROT_WRITE)
r = subyte(v, fubyte(v));
else
r = fubyte(v);
return(r);
}
/*
* Finish a fork operation, with process p2 nearly set up.
* Copy and update the pcb, set up the stack so that the child

View File

@ -95,23 +95,6 @@ static volatile u_int cpu_reset_proxy_active;
#endif
extern int _ucodesel, _udatasel;
/*
* quick version of vm_fault
*/
int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
int r;
if (prot & VM_PROT_WRITE)
r = subyte(v, fubyte(v));
else
r = fubyte(v);
return(r);
}
/*
* Finish a fork operation, with process p2 nearly set up.
* Copy and update the pcb, set up the stack so that the child

View File

@ -95,23 +95,6 @@ static volatile u_int cpu_reset_proxy_active;
#endif
extern int _ucodesel, _udatasel;
/*
* quick version of vm_fault
*/
int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
int r;
if (prot & VM_PROT_WRITE)
r = subyte(v, fubyte(v));
else
r = fubyte(v);
return(r);
}
/*
* Finish a fork operation, with process p2 nearly set up.
* Copy and update the pcb, set up the stack so that the child

View File

@ -96,22 +96,6 @@
#include <i386/include/psl.h>
/*
* quick version of vm_fault
*/
int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
int r;
if (prot & VM_PROT_WRITE)
r = subyte(v, fubyte(v));
else
r = fubyte(v);
return(r);
}
void
cpu_thread_exit(struct thread *td)
{

View File

@ -99,22 +99,6 @@
#include <sys/user.h>
/*
* quick version of vm_fault
*/
int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
int r;
if (prot & VM_PROT_WRITE)
r = subyte(v, fubyte(v));
else
r = fubyte(v);
return(r);
}
/*
* Finish a fork operation, with process p2 nearly set up.
* Copy and update the pcb, set up the stack so that the child

View File

@ -99,22 +99,6 @@
#include <sys/user.h>
/*
* quick version of vm_fault
*/
int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
int r;
if (prot & VM_PROT_WRITE)
r = subyte(v, fubyte(v));
else
r = fubyte(v);
return(r);
}
/*
* Finish a fork operation, with process p2 nearly set up.
* Copy and update the pcb, set up the stack so that the child

View File

@ -362,18 +362,3 @@ uma_small_free(void *mem, int size, u_int8_t flags)
vm_page_unlock_queues();
}
/*
* quick version of vm_fault
*/
int
vm_fault_quick(caddr_t v, int prot)
{
int r;
if (prot & VM_PROT_WRITE)
r = subyte(v, fubyte(v));
else
r = fubyte(v);
return(r);
}

View File

@ -921,6 +921,24 @@ RetryFault:;
return (KERN_SUCCESS);
}
/*
* vm_fault_quick:
*
* Ensure that the requested virtual address, which may be in userland,
* is valid. Fault-in the page if necessary. Return -1 on failure.
*/
int
vm_fault_quick(caddr_t v, int prot)
{
int r;
if (prot & VM_PROT_WRITE)
r = subyte(v, fubyte(v));
else
r = fubyte(v);
return(r);
}
/*
* vm_fault_wire:
*