2009-12-11 01:08:19 +01:00
|
|
|
/* This file contains memory management routines for RS.
|
|
|
|
*
|
|
|
|
* Changes:
|
|
|
|
* Nov 22, 2009: Created (Cristiano Giuffrida)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "inc.h"
|
|
|
|
|
2011-07-16 03:11:10 +02:00
|
|
|
#define minix_munmap _minix_munmap
|
|
|
|
#define minix_munmap_text _minix_munmap_text
|
2009-12-11 01:08:19 +01:00
|
|
|
#include <sys/mman.h>
|
2011-07-16 03:11:10 +02:00
|
|
|
#undef minix_munmap
|
|
|
|
#undef minix_munmap_text
|
2009-12-11 01:08:19 +01:00
|
|
|
|
|
|
|
PUBLIC int unmap_ok = 0;
|
|
|
|
|
|
|
|
/*===========================================================================*
|
2011-07-16 03:11:10 +02:00
|
|
|
* minix_munmap *
|
2009-12-11 01:08:19 +01:00
|
|
|
*===========================================================================*/
|
2011-07-16 03:11:10 +02:00
|
|
|
PUBLIC int minix_munmap(void *addrstart, vir_bytes len)
|
2009-12-11 01:08:19 +01:00
|
|
|
{
|
|
|
|
if(!unmap_ok)
|
|
|
|
return ENOSYS;
|
|
|
|
|
2011-07-16 03:11:10 +02:00
|
|
|
return _minix_munmap(addrstart, len);
|
2009-12-11 01:08:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*===========================================================================*
|
2011-07-16 03:11:10 +02:00
|
|
|
* minix_munmap_text *
|
2009-12-11 01:08:19 +01:00
|
|
|
*===========================================================================*/
|
2011-07-16 03:11:10 +02:00
|
|
|
PUBLIC int minix_munmap_text(void *addrstart, vir_bytes len)
|
2009-12-11 01:08:19 +01:00
|
|
|
{
|
|
|
|
if(!unmap_ok)
|
|
|
|
return ENOSYS;
|
|
|
|
|
2011-07-16 03:11:10 +02:00
|
|
|
return _minix_munmap_text(addrstart, len);
|
2009-12-11 01:08:19 +01:00
|
|
|
}
|