From 7e528c7b51f07f14e0974d53afbcd1eb4f5ad567 Mon Sep 17 00:00:00 2001 From: Vladimir Sedach Date: Thu, 10 Dec 2009 19:34:58 +0100 Subject: [PATCH] Add syscalls readv(2) and writev(2). --- src/syscalls/ffi-functions-unix.lisp | 14 ++++++++++++++ src/syscalls/pkgdcl.lisp | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/syscalls/ffi-functions-unix.lisp b/src/syscalls/ffi-functions-unix.lisp index f2ee0c3..23d6358 100644 --- a/src/syscalls/ffi-functions-unix.lisp +++ b/src/syscalls/ffi-functions-unix.lisp @@ -94,6 +94,20 @@ The two memory areas may overlap." (buf :pointer) (count size-t)) +(defsyscall (%sys-readv "readv") + (ssize-t :restart t :handle fd) + "Read from FD into the first IOVCNT buffers of the IOV array." + (fd :int) + (iov :pointer) + (iovcnt :int)) + +(defsyscall (%sys-writev "writev") + (ssize-t :restart t :handle fd) + "Writes to FD the first IOVCNT buffers of the IOV array." + (fd :int) + (iov :pointer) + (iovcnt :int)) + (defsyscall (%sys-pread (#+linux "pread64" "pread")) (ssize-t :restart t :handle fd) "Read at most COUNT bytes from FD at offset OFFSET into the foreign area BUF." diff --git a/src/syscalls/pkgdcl.lisp b/src/syscalls/pkgdcl.lisp index e74f432..5419a47 100644 --- a/src/syscalls/pkgdcl.lisp +++ b/src/syscalls/pkgdcl.lisp @@ -87,6 +87,8 @@ ;; Files #:%sys-read #:%sys-write + #:%sys-readv + #:%sys-writev #:%sys-pread #:%sys-pwrite #:%sys-open -- 2.11.4.GIT