From: Christoph Hellwig Subject: [PATCH 2/6] move _body_io_syscall to the generic syscall.h Date: Thu, 4 Jan 2018 09:03:21 +0100 Message-ID: <20180104080325.14716-3-hch@lst.de> References: <20180104080325.14716-1-hch@lst.de> Cc: Avi Kivity , linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: linux-aio@kvack.org Return-path: In-Reply-To: <20180104080325.14716-1-hch@lst.de> Sender: owner-linux-aio@kvack.org List-Id: netdev.vger.kernel.org This way it can be used for the fallback 6-argument version on all architectures. Signed-off-by: Christoph Hellwig --- src/syscall-generic.h | 6 ------ src/syscall.h | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/syscall-generic.h b/src/syscall-generic.h index 24d7c7c..35b8580 100644 --- a/src/syscall-generic.h +++ b/src/syscall-generic.h @@ -2,12 +2,6 @@ #include #include -#define _body_io_syscall(sname, args...) \ -{ \ - int ret = syscall(__NR_##sname, ## args); \ - return ret < 0 ? -errno : ret; \ -} - #define io_syscall1(type,fname,sname,type1,arg1) \ type fname(type1 arg1) \ _body_io_syscall(sname, (long)arg1) diff --git a/src/syscall.h b/src/syscall.h index a2da030..3819519 100644 --- a/src/syscall.h +++ b/src/syscall.h @@ -10,6 +10,13 @@ #define DEFSYMVER(compat_sym, orig_sym, ver_sym) \ __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym)); +/* generic fallback */ +#define _body_io_syscall(sname, args...) \ +{ \ + int ret = syscall(__NR_##sname, ## args); \ + return ret < 0 ? -errno : ret; \ +} + #if defined(__i386__) #include "syscall-i386.h" #elif defined(__x86_64__) -- 2.14.2 -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org