提交 1c76683c 编写于 作者: R Rich Felker

add syscall wrappers for posix_fadvise, posix_fallocate

上级 145c0534
...@@ -527,6 +527,8 @@ static inline long __syscall6(long __n, long __a1, long __a2, long __a3, long __ ...@@ -527,6 +527,8 @@ static inline long __syscall6(long __n, long __a1, long __a2, long __a3, long __
#define __NR_pread __NR_pread64 #define __NR_pread __NR_pread64
#define __NR_pwrite __NR_pwrite64 #define __NR_pwrite __NR_pwrite64
#define __NR_fadvise __NR_fadvise64_64
#undef __NR_getrlimit #undef __NR_getrlimit
#define __NR_getrlimit __NR_ugetrlimit #define __NR_getrlimit __NR_ugetrlimit
...@@ -936,6 +938,8 @@ static inline long __syscall6(long __n, long __a1, long __a2, long __a3, long __ ...@@ -936,6 +938,8 @@ static inline long __syscall6(long __n, long __a1, long __a2, long __a3, long __
#define SYS_pread SYS_pread64 #define SYS_pread SYS_pread64
#define SYS_pwrite SYS_pwrite64 #define SYS_pwrite SYS_pwrite64
#define SYS_fadvise SYS_fadvise64_64
#undef SYS_getrlimit #undef SYS_getrlimit
#define SYS_getrlimit SYS_ugetrlimit #define SYS_getrlimit SYS_ugetrlimit
......
...@@ -375,6 +375,7 @@ static inline long __syscall6(long __n, long __a1, long __a2, long __a3, long __ ...@@ -375,6 +375,7 @@ static inline long __syscall6(long __n, long __a1, long __a2, long __a3, long __
#define __NR_pread __NR_pread64 #define __NR_pread __NR_pread64
#define __NR_pwrite __NR_pwrite64 #define __NR_pwrite __NR_pwrite64
#define __NR_getdents __NR_getdents64 #define __NR_getdents __NR_getdents64
#define __NR_fadvise __NR_fadvise64
...@@ -692,5 +693,6 @@ static inline long __syscall6(long __n, long __a1, long __a2, long __a3, long __ ...@@ -692,5 +693,6 @@ static inline long __syscall6(long __n, long __a1, long __a2, long __a3, long __
#define SYS_pread SYS_pread64 #define SYS_pread SYS_pread64
#define SYS_pwrite SYS_pwrite64 #define SYS_pwrite SYS_pwrite64
#define SYS_getdents SYS_getdents64 #define SYS_getdents SYS_getdents64
#define SYS_fadvise SYS_fadvise64
#include <fcntl.h>
#include "syscall.h"
int posix_fadvise(int fd, off_t base, off_t len, int advice)
{
return -__syscall(SYS_fadvise, fd, __SYSCALL_LL(base),
__SYSCALL_LL(len), advice);
}
#include <fcntl.h>
#include "syscall.h"
int posix_fallocate(int fd, off_t base, off_t len)
{
return -__syscall(SYS_fallocate, fd, __SYSCALL_LL(base),
__SYSCALL_LL(len));
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册