[PATCH] splice.h - convert _syscallX to syscall
authorBrandon Philips <brandon@ifup.org>
Mon, 5 Feb 2007 14:22:43 +0000 (15:22 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 5 Feb 2007 14:22:43 +0000 (15:22 +0100)
When I tried building your demo splice apps from splice.git it failed
because _syscallX macros don't exist/work on my system.  The use of
_syscallX seems to be deprecated anyways.

This patch converts the calls from _syscallX() to syscall()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
splice.h

index f069b1b486a5cc462d5c16d80057b1ac40391518..eb0654cc4ab1958ffdf99baefac7a9ff741c2681 100644 (file)
--- a/splice.h
+++ b/splice.h
 #define SPLICE_F_MORE  (0x04)  /* expect more data */
 #define SPLICE_F_GIFT   (0x08)  /* pages passed in are a gift */
 
-_syscall6(int, sys_splice, int, fdin, loff_t *, off_in, int, fdout, loff_t *, off_out, size_t, len, unsigned int, flags);
-_syscall4(int, sys_vmsplice, int, fd, const struct iovec *, iov, unsigned long, nr_segs, unsigned int, flags);
-_syscall4(int, sys_tee, int, fdin, int, fdout, size_t, len, unsigned int, flags);
-
 static inline int splice(int fdin, loff_t *off_in, int fdout, loff_t *off_out,
                         size_t len, unsigned long flags)
 {
-       return sys_splice(fdin, off_in, fdout, off_out, len, flags);
+       
+       return syscall(__NR_sys_splice, fdin, off_in, fdout, off_out, len, flags);
 }
 
 static inline int tee(int fdin, int fdout, size_t len, unsigned int flags)
 {
-       return sys_tee(fdin, fdout, len, flags);
+       return syscall(__NR_sys_tee, fdin, fdout, len, flags);
 }
 
 static inline int vmsplice(int fd, const struct iovec *iov,
                           unsigned long nr_segs, unsigned int flags)
 {
-       return sys_vmsplice(fd, iov, nr_segs, flags);
+       return syscall(__NR_sys_vmsplice, fd, iov, nr_segs, flags);
 }
 
 #define SPLICE_SIZE    (64*1024)