aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sync_file_range.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sync_file_range.c')
-rw-r--r--sysdeps/unix/sysv/linux/sync_file_range.c39
1 files changed, 7 insertions, 32 deletions
diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/sync_file_range.c
index c07ece0f70..2ea6dcfbe6 100644
--- a/sysdeps/unix/sysv/linux/sync_file_range.c
+++ b/sysdeps/unix/sysv/linux/sync_file_range.c
@@ -28,43 +28,18 @@
int
sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
{
- if (SINGLE_THREAD_P)
- return INLINE_SYSCALL (sync_file_range, 6, fd,
- __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
- __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
- flags);
-
- int result;
- int oldtype = LIBC_CANCEL_ASYNC ();
-
- result = INLINE_SYSCALL (sync_file_range, 6, fd,
- __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
- __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
- flags);
-
- LIBC_CANCEL_RESET (oldtype);
-
- return result;
+ return SYSCALL_CANCEL (sync_file_range, fd,
+ __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+ __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
+ flags);
}
#elif defined __NR_sync_file_range2
int
sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
{
- if (SINGLE_THREAD_P)
- return INLINE_SYSCALL (sync_file_range2, 6, fd, flags,
- __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
- __LONG_LONG_PAIR ((long) (to >> 32), (long) to));
-
- int result;
- int oldtype = LIBC_CANCEL_ASYNC ();
-
- result = INLINE_SYSCALL (sync_file_range2, 6, fd, flags,
- __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
- __LONG_LONG_PAIR ((long) (to >> 32), (long) to));
-
- LIBC_CANCEL_RESET (oldtype);
-
- return result;
+ return SYSCALL_CANCEL (sync_file_range2, fd, flags,
+ __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+ __LONG_LONG_PAIR ((long) (to >> 32), (long) to));
}
#else
int