4 #include <minix/safecopies.h>
6 PUBLIC
int sys_safecopyfrom(endpoint_t src_e
,
7 cp_grant_id_t gr_id
, vir_bytes offset
,
8 vir_bytes address
, size_t bytes
,
11 /* Transfer a block of data for which the other process has previously
17 copy_mess
.SCP_FROM_TO
= src_e
;
18 copy_mess
.SCP_SEG
= my_seg
;
19 copy_mess
.SCP_GID
= gr_id
;
20 copy_mess
.SCP_OFFSET
= (long) offset
;
21 copy_mess
.SCP_ADDRESS
= (char *) address
;
22 copy_mess
.SCP_BYTES
= (long) bytes
;
24 return(_taskcall(SYSTASK
, SYS_SAFECOPYFROM
, ©_mess
));
28 PUBLIC
int sys_safecopyto(endpoint_t dst_e
,
29 cp_grant_id_t gr_id
, vir_bytes offset
,
30 vir_bytes address
, size_t bytes
,
33 /* Transfer a block of data for which the other process has previously
39 copy_mess
.SCP_FROM_TO
= dst_e
;
40 copy_mess
.SCP_SEG
= my_seg
;
41 copy_mess
.SCP_GID
= gr_id
;
42 copy_mess
.SCP_OFFSET
= (long) offset
;
43 copy_mess
.SCP_ADDRESS
= (char *) address
;
44 copy_mess
.SCP_BYTES
= (long) bytes
;
46 return(_taskcall(SYSTASK
, SYS_SAFECOPYTO
, ©_mess
));