From: Ben Gras Date: Thu, 11 Oct 2012 13:15:48 +0000 (+0200) Subject: VM: munmap used by VM for itself is no longer used X-Git-Tag: v3.2.1~289 X-Git-Url: http://zhaoyanbai.com/repos/html/index.html?a=commitdiff_plain;h=fd4ddef49a10751e21aa1250709e20a617a9f7dc;p=minix.git VM: munmap used by VM for itself is no longer used --- diff --git a/servers/vm/mmap.c b/servers/vm/mmap.c index 6a2470071..57313bb9e 100644 --- a/servers/vm/mmap.c +++ b/servers/vm/mmap.c @@ -446,41 +446,3 @@ int do_munmap(message *m) 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); -} -