etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libsys / sys_vumap.c
blobb1b56b449be23300b5e290f68b53d05a32496877
1 #include "syslib.h"
3 /*===========================================================================*
4 * sys_vumap *
5 *===========================================================================*/
6 int sys_vumap(
7 endpoint_t endpt, /* source process endpoint, or SELF */
8 struct vumap_vir *vvec, /* virtual (input) vector */
9 int vcount, /* number of elements in vvec */
10 size_t offset, /* offset into first vvec element */
11 int access, /* requested safecopy access flags */
12 struct vumap_phys *pvec, /* physical (output) vector */
13 int *pcount /* (max, returned) nr of els in pvec */
16 message m;
17 int r;
19 m.m_lsys_krn_sys_vumap.endpt = endpt;
20 m.m_lsys_krn_sys_vumap.vaddr = (vir_bytes) vvec;
21 m.m_lsys_krn_sys_vumap.vcount = vcount;
22 m.m_lsys_krn_sys_vumap.offset = offset;
23 m.m_lsys_krn_sys_vumap.access = access;
24 m.m_lsys_krn_sys_vumap.paddr = (vir_bytes) pvec;
25 m.m_lsys_krn_sys_vumap.pmax = *pcount;
27 r = _kernel_call(SYS_VUMAP, &m);
29 if (r != OK)
30 return r;
32 *pcount = m.m_krn_lsys_sys_vumap.pcount;
33 return OK;