return OK;
}
-int unmap_ok = 0;
-
-/*===========================================================================*
- * munmap_lin (used for overrides for VM) *
- *===========================================================================*/
-static int munmap_lin(vir_bytes addr, size_t len)
-{
- if(addr % VM_PAGE_SIZE) {
- printf("munmap_lin: offset not page aligned\n");
- return EFAULT;
- }
-
- if(len % VM_PAGE_SIZE) {
- printf("munmap_lin: len not page aligned\n");
- return EFAULT;
- }
-
- if(pt_writemap(NULL, &vmproc[VM_PROC_NR].vm_pt, addr, MAP_NONE, len, 0,
- WMF_OVERWRITE | WMF_FREE) != OK) {
- printf("munmap_lin: pt_writemap failed\n");
- return EFAULT;
- }
-
- return OK;
-}
-
-/*===========================================================================*
- * munmap (override for VM) *
- *===========================================================================*/
-int minix_munmap(void *addr, size_t len)
-{
- vir_bytes laddr;
- if(!unmap_ok)
- return ENOSYS;
- laddr = (vir_bytes) (vir_bytes) addr;
- return munmap_lin(laddr, len);
-}
-