Skip to content

Commit

Permalink
linux-user: add kcmp() syscall
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
  • Loading branch information
vivier authored and Riku Voipio committed Oct 21, 2016
1 parent a7c65cb commit 2f14788
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions linux-user/syscall.c
Expand Up @@ -305,6 +305,11 @@ _syscall3(int, ioprio_set, int, which, int, who, int, ioprio)
_syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags)
#endif

#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
_syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type,
unsigned long, idx1, unsigned long, idx2)
#endif

static bitmask_transtbl fcntl_flags_tbl[] = {
{ TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, },
{ TARGET_O_ACCMODE, TARGET_O_RDWR, O_ACCMODE, O_RDWR, },
Expand Down Expand Up @@ -12080,6 +12085,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
ret = get_errno(unshare(arg1));
break;
#endif
#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
case TARGET_NR_kcmp:
ret = get_errno(kcmp(arg1, arg2, arg3, arg4, arg5));
break;
#endif

default:
unimplemented:
Expand Down

0 comments on commit 2f14788

Please sign in to comment.