3 int sys_vircopy(src_proc
, src_vir
,
4 dst_proc
, dst_vir
, bytes
)
5 endpoint_t src_proc
; /* source process */
6 vir_bytes src_vir
; /* source virtual address */
7 endpoint_t dst_proc
; /* destination process */
8 vir_bytes dst_vir
; /* destination virtual address */
9 phys_bytes bytes
; /* how many bytes */
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.
18 if (bytes
== 0L) return(OK
);
19 copy_mess
.CP_SRC_ENDPT
= src_proc
;
20 copy_mess
.CP_SRC_ADDR
= (long) src_vir
;
21 copy_mess
.CP_DST_ENDPT
= dst_proc
;
22 copy_mess
.CP_DST_ADDR
= (long) dst_vir
;
23 copy_mess
.CP_NR_BYTES
= (long) bytes
;
25 /* backwards compatability D segs */
26 copy_mess
.CP_DST_SPACE_OBSOLETE
= D_OBSOLETE
;
27 copy_mess
.CP_SRC_SPACE_OBSOLETE
= D_OBSOLETE
;
29 return(_kernel_call(SYS_VIRCOPY
, ©_mess
));