1 #include "syslib.h" 2 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 */ 14 ) 15 { 16 message m; 17 int r; 18 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; 26 27 r = _kernel_call(SYS_VUMAP, &m); 28 29 if (r != OK) 30 return r; 31 32 *pcount = m.m_krn_lsys_sys_vumap.pcount; 33 return OK; 34 } 35