etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libsys / sys_vircopy.c
blob4ee5033ad6e7e4db3ddb73c3c999d0436ec034d3
1 #include "syslib.h"
2 #include <string.h>
4 int sys_vircopy(src_proc, src_vir,
5 dst_proc, dst_vir, bytes, flags)
6 endpoint_t src_proc; /* source process */
7 vir_bytes src_vir; /* source virtual address */
8 endpoint_t dst_proc; /* destination process */
9 vir_bytes dst_vir; /* destination virtual address */
10 phys_bytes bytes; /* how many bytes */
11 int flags; /* copy flags */
13 /* Transfer a block of data. The source and destination can each either be a
14 * process number or SELF (to indicate own process number).
17 message copy_mess;
19 if (bytes == 0L) return(OK);
20 memset(&copy_mess, 0, sizeof(copy_mess));
21 copy_mess.m_lsys_krn_sys_copy.src_endpt = src_proc;
22 copy_mess.m_lsys_krn_sys_copy.src_addr = src_vir;
23 copy_mess.m_lsys_krn_sys_copy.dst_endpt = dst_proc;
24 copy_mess.m_lsys_krn_sys_copy.dst_addr = dst_vir;
25 copy_mess.m_lsys_krn_sys_copy.nr_bytes = bytes;
26 copy_mess.m_lsys_krn_sys_copy.flags = flags;
28 return(_kernel_call(SYS_VIRCOPY, &copy_mess));