Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/mem.c
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | while (uio->uio_resid > 0 && error == 0) { | ||||
pmap_invalidate_page(kernel_pmap,(vm_offset_t)ptvmmap); | pmap_invalidate_page(kernel_pmap,(vm_offset_t)ptvmmap); | ||||
o = (int)uio->uio_offset & PAGE_MASK; | o = (int)uio->uio_offset & PAGE_MASK; | ||||
c = PAGE_SIZE - o; | c = PAGE_SIZE - o; | ||||
c = min(c, (u_int)iov->iov_len); | c = min(c, (u_int)iov->iov_len); | ||||
error = uiomove((caddr_t)&ptvmmap[o], (int)c, uio); | error = uiomove((caddr_t)&ptvmmap[o], (int)c, uio); | ||||
pmap_qremove((vm_offset_t)ptvmmap, 1); | pmap_qremove((vm_offset_t)ptvmmap, 1); | ||||
sx_xunlock(&memsxlock); | sx_xunlock(&memsxlock); | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
/* | /* | ||||
* allow user processes to MMAP some memory sections | * allow user processes to MMAP some memory sections | ||||
* instead of going through read/write | * instead of going through read/write | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |