]> Zhao Yanbai Git Server - minix.git/commitdiff
library interface for vectored safecopy variant.
authorBen Gras <ben@minix3.org>
Fri, 23 Jun 2006 11:54:35 +0000 (11:54 +0000)
committerBen Gras <ben@minix3.org>
Fri, 23 Jun 2006 11:54:35 +0000 (11:54 +0000)
lib/syslib/Makefile.in
lib/syslib/sys_vsafecopy.c [new file with mode: 0644]

index 2a4b8b0255b449b4ffabf6eee8e8a7ab2f9b127f..0c8584e7d96fdbdeaa556333c776fceda4235d4a 100644 (file)
@@ -42,6 +42,7 @@ libsys_FILES=" \
        sys_out.c \
        sys_physcopy.c \
        sys_safecopy.c \
+       sys_vsafecopy.c \
        sys_sdevio.c \
        sys_segctl.c \
        sys_setalarm.c \
diff --git a/lib/syslib/sys_vsafecopy.c b/lib/syslib/sys_vsafecopy.c
new file mode 100644 (file)
index 0000000..343dd0f
--- /dev/null
@@ -0,0 +1,18 @@
+
+#include "syslib.h"
+
+#include <minix/safecopies.h>
+
+PUBLIC int sys_vsafecopy(struct vscp_vec *vec, int els)
+{
+/* Vectored variant of sys_safecopy*. */
+
+  message copy_mess;
+
+  copy_mess.VSCP_VEC_ADDR = vec;
+  copy_mess.VSCP_VEC_SIZE = els;
+
+  return(_taskcall(SYSTASK, SYS_VSAFECOPY, &copy_mess));
+
+}
+