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;