Drop main() prototype. Syncs with NetBSD-8
[minix.git] / minix / lib / libsys / sys_physcopy.c
blobc052ed28486ff92029deb5a08d53b65edd5b4587
1 #include "syslib.h"
3 int sys_physcopy(src_proc, src_vir, dst_proc, dst_vir, bytes, flags)
4 endpoint_t src_proc; /* source process */
5 vir_bytes src_vir; /* source virtual address */
6 endpoint_t dst_proc; /* destination process */
7 vir_bytes dst_vir; /* destination virtual address */
8 phys_bytes bytes; /* how many bytes */
9 int flags; /* copy flags */
11 /* Transfer a block of data. The source and destination can each either be a
12 * process number or SELF (to indicate own process number). Virtual addresses
13 * are offsets within LOCAL_SEG (text, stack, data), or BIOS_SEG.
14 * Physicall addressing is also possible with PHYS_SEG.
17 message copy_mess;
19 if (bytes == 0L) return(OK);
20 copy_mess.m_lsys_krn_sys_copy.src_endpt = src_proc;
21 copy_mess.m_lsys_krn_sys_copy.src_addr = src_vir;
22 copy_mess.m_lsys_krn_sys_copy.dst_endpt = dst_proc;
23 copy_mess.m_lsys_krn_sys_copy.dst_addr = dst_vir;
24 copy_mess.m_lsys_krn_sys_copy.nr_bytes = bytes;
25 copy_mess.m_lsys_krn_sys_copy.flags = flags;
27 return(_kernel_call(SYS_PHYSCOPY, &copy_mess));