4 #include <minix/safecopies.h>
6 int sys_safecopyfrom(endpoint_t src_e
,
7 cp_grant_id_t gr_id
, vir_bytes offset
,
8 vir_bytes address
, size_t bytes
)
10 /* Transfer a block of data for which the other process has previously
16 copy_mess
.SCP_FROM_TO
= src_e
;
17 copy_mess
.SCP_GID
= gr_id
;
18 copy_mess
.SCP_OFFSET
= (long) offset
;
19 copy_mess
.SCP_ADDRESS
= (char *) address
;
20 copy_mess
.SCP_BYTES
= (long) bytes
;
22 return(_kernel_call(SYS_SAFECOPYFROM
, ©_mess
));
26 int sys_safecopyto(endpoint_t dst_e
,
27 cp_grant_id_t gr_id
, vir_bytes offset
,
28 vir_bytes address
, size_t bytes
)
30 /* Transfer a block of data for which the other process has previously
36 copy_mess
.SCP_FROM_TO
= dst_e
;
37 copy_mess
.SCP_GID
= gr_id
;
38 copy_mess
.SCP_OFFSET
= (long) offset
;
39 copy_mess
.SCP_ADDRESS
= (char *) address
;
40 copy_mess
.SCP_BYTES
= (long) bytes
;
42 return(_kernel_call(SYS_SAFECOPYTO
, ©_mess
));