custom message type for VM_INFO
[minix3.git] / lib / libsys / sys_umap.c
blobc970ed0ec59590cf7ecfa48e771dc611e65bdf4f
1 #include "syslib.h"
3 /*===========================================================================*
4 * sys_umap *
5 *===========================================================================*/
6 int sys_umap(proc_ep, seg, vir_addr, bytes, phys_addr)
7 endpoint_t proc_ep; /* process number to do umap for */
8 int seg; /* T, D, or S segment */
9 vir_bytes vir_addr; /* address in bytes with segment*/
10 vir_bytes bytes; /* number of bytes to be copied */
11 phys_bytes *phys_addr; /* placeholder for result */
13 message m;
14 int result;
16 m.m_lsys_krn_sys_umap.src_endpt = proc_ep;
17 m.m_lsys_krn_sys_umap.segment = seg;
18 m.m_lsys_krn_sys_umap.src_addr = vir_addr;
19 m.m_lsys_krn_sys_umap.nr_bytes = bytes;
21 result = _kernel_call(SYS_UMAP, &m);
22 *phys_addr = m.m_krn_lsys_sys_umap.dst_addr;
23 return(result);