Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/sys_process.c
Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Lines | do { | ||||
/* | /* | ||||
* How many bytes to copy | * How many bytes to copy | ||||
*/ | */ | ||||
len = min(PAGE_SIZE - page_offset, uio->uio_resid); | len = min(PAGE_SIZE - page_offset, uio->uio_resid); | ||||
/* | /* | ||||
* Fault and hold the page on behalf of the process. | * Fault and hold the page on behalf of the process. | ||||
*/ | */ | ||||
error = vm_fault_hold(map, pageno, reqprot, fault_flags, &m); | error = vm_fault(map, pageno, reqprot, fault_flags, &m); | ||||
if (error != KERN_SUCCESS) { | if (error != KERN_SUCCESS) { | ||||
if (error == KERN_RESOURCE_SHORTAGE) | if (error == KERN_RESOURCE_SHORTAGE) | ||||
error = ENOMEM; | error = ENOMEM; | ||||
else | else | ||||
error = EFAULT; | error = EFAULT; | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,256 Lines • Show Last 20 Lines |