add syscall wrappers for posix_fadvise, posix_fallocate
This commit is contained in:
parent
145c05345d
commit
1c76683cb4
4 changed files with 22 additions and 0 deletions
8
src/fcntl/posix_fadvise.c
Normal file
8
src/fcntl/posix_fadvise.c
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#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);
|
||||
}
|
||||
8
src/fcntl/posix_fallocate.c
Normal file
8
src/fcntl/posix_fallocate.c
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#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));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue