diff options
author | dillon <dillon@FreeBSD.org> | 2003-01-16 00:02:21 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2003-01-16 00:02:21 +0000 |
commit | aba727244c613709f34584ebb620cba33b270aa8 (patch) | |
tree | e3cb42f591e5e313002c7ff53f9f04d2e262afbe /sys/vm | |
parent | bd6fdb8977d9154d972b0403fd08b7f1a258be6c (diff) | |
download | FreeBSD-src-aba727244c613709f34584ebb620cba33b270aa8.zip FreeBSD-src-aba727244c613709f34584ebb620cba33b270aa8.tar.gz |
Merge all the various copies of vm_fault_quick() into a single
portable copy.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_fault.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index e12e362..abb9ef3 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -922,6 +922,24 @@ readrest: } /* + * 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: * * Wire down a range of virtual addresses in a map. |