aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2019-05-13 11:02:53 +0200
committerLaurent Vivier <laurent@vivier.eu>2020-02-19 11:17:40 +0100
commit8500476f3cc4d9e1f710290be9fcf86429dd8dda (patch)
tree280071a5490cc4c098fcb0e6d8c743b945f540b3 /linux-user
parent6c599282f8ab382fe59f03a6cae755b89561a7b3 (diff)
linux-user: Implement membarrier syscall
Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <mvmpnomohfm.fsf@suse.de> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index c930577686..7aaa9d9639 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -334,6 +334,9 @@ _syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type,
_syscall5(int, sys_statx, int, dirfd, const char *, pathname, int, flags,
unsigned int, mask, struct target_statx *, statxbuf)
#endif
+#if defined(TARGET_NR_membarrier) && defined(__NR_membarrier)
+_syscall2(int, membarrier, int, cmd, int, flags)
+#endif
static bitmask_transtbl fcntl_flags_tbl[] = {
{ TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, },
@@ -12090,6 +12093,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
unlock_user(p, arg1, 0);
return ret;
#endif
+#if defined TARGET_NR_membarrier && defined __NR_membarrier
+ case TARGET_NR_membarrier:
+ return get_errno(membarrier(arg1, arg2));
+#endif
default:
qemu_log_mask(LOG_UNIMP, "Unsupported syscall: %d\n", num);