2008-11-19 13:26:10 +01:00
|
|
|
|
|
|
|
#include "syslib.h"
|
|
|
|
|
2013-11-03 22:33:44 +01:00
|
|
|
#include <string.h>
|
2008-11-19 13:26:10 +01:00
|
|
|
#include <minix/vm.h>
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* vm_umap *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int vm_umap(int seg, vir_bytes offset, vir_bytes len, phys_bytes *addr)
|
2008-11-19 13:26:10 +01:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
int result;
|
|
|
|
|
2013-11-03 22:33:44 +01:00
|
|
|
memset(&m, 0, sizeof(m));
|
2008-11-19 13:26:10 +01:00
|
|
|
m.VMU_SEG = seg;
|
2009-10-05 18:41:28 +02:00
|
|
|
m.VMU_OFFSET = (char *) offset;
|
|
|
|
m.VMU_LENGTH = (char *) len;
|
2008-11-19 13:26:10 +01:00
|
|
|
result = _taskcall(VM_PROC_NR, VM_UMAP, &m);
|
2009-10-05 18:41:28 +02:00
|
|
|
*addr = (phys_bytes) m.VMU_RETADDR;
|
2008-11-19 13:26:10 +01:00
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|