minix/lib/libsys/sys_umap.c
Lionel Sambuc dc823abec2 Message type for SYS_UMAP{,_REMOTE}
Change-Id: Id46df10aee6189a0d3673013b498c7cc79edcc7e
2014-07-28 17:05:47 +02:00

25 lines
875 B
C

#include "syslib.h"
/*===========================================================================*
* sys_umap *
*===========================================================================*/
int sys_umap(proc_ep, seg, vir_addr, bytes, phys_addr)
endpoint_t proc_ep; /* process number to do umap for */
int seg; /* T, D, or S segment */
vir_bytes vir_addr; /* address in bytes with segment*/
vir_bytes bytes; /* number of bytes to be copied */
phys_bytes *phys_addr; /* placeholder for result */
{
message m;
int result;
m.m_lsys_krn_sys_umap.src_endpt = proc_ep;
m.m_lsys_krn_sys_umap.segment = seg;
m.m_lsys_krn_sys_umap.src_addr = vir_addr;
m.m_lsys_krn_sys_umap.nr_bytes = bytes;
result = _kernel_call(SYS_UMAP, &m);
*phys_addr = m.m_krn_lsys_sys_umap.dst_addr;
return(result);
}