From b9febd52bc146f5bb4562fd3e66d68990b95bda4 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 1 Dec 2011 19:59:03 +0400 Subject: [PATCH] syscall: Add sys_flock helper Signed-off-by: Cyrill Gorcunov --- include/syscall-codes.h | 1 + include/syscall.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/syscall-codes.h b/include/syscall-codes.h index 344d159a1..b615e2049 100644 --- a/include/syscall-codes.h +++ b/include/syscall-codes.h @@ -22,6 +22,7 @@ #define __NR_getpid 39 #define __NR_clone 56 #define __NR_exit 60 +#define __NR_flock 73 #define __NR_unlink 87 #define __NR__sysctl 156 #define __NR_prctl 157 diff --git a/include/syscall.h b/include/syscall.h index 104f3f3c2..745034d4b 100644 --- a/include/syscall.h +++ b/include/syscall.h @@ -261,6 +261,11 @@ static always_inline long sys_futex(u32 *uaddr, int op, u32 val, (unsigned long)val3); } +static always_inline long sys_flock(unsigned long fd, unsigned long cmd) +{ + return syscall2(__NR_flock, fd, cmd); +} + static void always_inline local_sleep(long seconds) { struct timespec req, rem;