[9] | 1 | #include "syslib.h"
|
---|
| 2 |
|
---|
| 3 | PUBLIC int sys_vircopy(src_proc, src_seg, src_vir,
|
---|
| 4 | dst_proc, dst_seg, dst_vir, bytes)
|
---|
| 5 | int src_proc; /* source process */
|
---|
| 6 | int src_seg; /* source memory segment */
|
---|
| 7 | vir_bytes src_vir; /* source virtual address */
|
---|
| 8 | int dst_proc; /* destination process */
|
---|
| 9 | int dst_seg; /* destination memory segment */
|
---|
| 10 | vir_bytes dst_vir; /* destination virtual address */
|
---|
| 11 | phys_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, ©_mess));
|
---|
| 29 | }
|
---|