diff options
author | vskipin <vskipin@yandex-team.ru> | 2022-02-10 16:46:00 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:00 +0300 |
commit | 4d8b546b89b5afc08cf3667e176271c7ba935f33 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/libaio/syscall-generic.h | |
parent | 4e4b78bd7b67e2533da4dbb9696374a6d6068e32 (diff) | |
download | ydb-4d8b546b89b5afc08cf3667e176271c7ba935f33.tar.gz |
Restoring authorship annotation for <vskipin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/libaio/syscall-generic.h')
-rw-r--r-- | contrib/libs/libaio/syscall-generic.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/contrib/libs/libaio/syscall-generic.h b/contrib/libs/libaio/syscall-generic.h index 24b3a3dec1..24d7c7c816 100644 --- a/contrib/libs/libaio/syscall-generic.h +++ b/contrib/libs/libaio/syscall-generic.h @@ -1,29 +1,29 @@ -#include <errno.h> -#include <unistd.h> -#include <sys/syscall.h> - -#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) - -#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ -type fname(type1 arg1,type2 arg2) \ -_body_io_syscall(sname, (long)arg1, (long)arg2) - -#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ -type fname(type1 arg1,type2 arg2,type3 arg3) \ -_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3) - -#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4) - -#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \ -type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5) +#include <errno.h> +#include <unistd.h> +#include <sys/syscall.h> + +#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) + +#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ +type fname(type1 arg1,type2 arg2) \ +_body_io_syscall(sname, (long)arg1, (long)arg2) + +#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ +type fname(type1 arg1,type2 arg2,type3 arg3) \ +_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3) + +#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ +type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ +_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4) + +#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \ +type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ +_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5) |