minix/lib/libsys/vm_umap.c

25 lines
614 B
C
Raw Normal View History

#include "syslib.h"
#include <string.h>
#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)
{
message m;
int result;
memset(&m, 0, sizeof(m));
m.VMU_SEG = seg;
m.VMU_OFFSET = (char *) offset;
m.VMU_LENGTH = (char *) len;
result = _taskcall(VM_PROC_NR, VM_UMAP, &m);
*addr = (phys_bytes) m.VMU_RETADDR;
return result;
}