minix/servers/rs/memory.c
Ben Gras 02081e4b62 rename mmap() and munmap()
. it's a good extra interface to have but doesn't
	  meet standardised functionality
	. applications (in pkgsrc) find it and expect
	  full functionality the minix mmap doesn't offter
	. on the whole probably better to hide these functions
	  (mmap and friends) until they are grown up; the base system
	  can use the new minix_* names
2011-07-16 13:01:19 +02:00

37 lines
1,022 B
C

/* This file contains memory management routines for RS.
*
* Changes:
* Nov 22, 2009: Created (Cristiano Giuffrida)
*/
#include "inc.h"
#define minix_munmap _minix_munmap
#define minix_munmap_text _minix_munmap_text
#include <sys/mman.h>
#undef minix_munmap
#undef minix_munmap_text
PUBLIC int unmap_ok = 0;
/*===========================================================================*
* minix_munmap *
*===========================================================================*/
PUBLIC int minix_munmap(void *addrstart, vir_bytes len)
{
if(!unmap_ok)
return ENOSYS;
return _minix_munmap(addrstart, len);
}
/*===========================================================================*
* minix_munmap_text *
*===========================================================================*/
PUBLIC int minix_munmap_text(void *addrstart, vir_bytes len)
{
if(!unmap_ok)
return ENOSYS;
return _minix_munmap_text(addrstart, len);
}