source: trunk/minix/lib/syslib/sys_vircopy.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 1.0 KB
Line 
1#include "syslib.h"
2
3PUBLIC int sys_vircopy(src_proc, src_seg, src_vir,
4 dst_proc, dst_seg, dst_vir, bytes)
5int src_proc; /* source process */
6int src_seg; /* source memory segment */
7vir_bytes src_vir; /* source virtual address */
8int dst_proc; /* destination process */
9int dst_seg; /* destination memory segment */
10vir_bytes dst_vir; /* destination virtual address */
11phys_bytes bytes; /* how many bytes */
12{
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). Virtual addresses
15 * are offsets within LOCAL_SEG (text, stack, data), REMOTE_SEG, or BIOS_SEG.
16 */
17
18 message copy_mess;
19
20 if (bytes == 0L) return(OK);
21 copy_mess.CP_SRC_ENDPT = src_proc;
22 copy_mess.CP_SRC_SPACE = src_seg;
23 copy_mess.CP_SRC_ADDR = (long) src_vir;
24 copy_mess.CP_DST_ENDPT = dst_proc;
25 copy_mess.CP_DST_SPACE = dst_seg;
26 copy_mess.CP_DST_ADDR = (long) dst_vir;
27 copy_mess.CP_NR_BYTES = (long) bytes;
28 return(_taskcall(SYSTASK, SYS_VIRCOPY, &copy_mess));
29}
Note: See TracBrowser for help on using the repository browser.