move benchmarks to their own dir.
[minix.git] / lib / syslib / sys_safecopy.c
blobdf6b50f2011fd7852879ff8135e91675655d2648
2 #include "syslib.h"
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,
9 int my_seg)
11 /* Transfer a block of data for which the other process has previously
12 * given permission.
15 message copy_mess;
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, &copy_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,
31 int my_seg)
33 /* Transfer a block of data for which the other process has previously
34 * given permission.
37 message copy_mess;
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, &copy_mess));