linux-user: Implement membarrier syscall
PATCH 1/1 linux-user: Implement membarrier syscall
Signed-off-by Andreas Schwab <[email protected]>
--- linux-user/syscall.c | 7 +++++++ 1 file changed, 7 insertions(+)
linux-user/syscall.c +7 -0
@@ -313,6 +313,9 @@ _syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags)_syscall5 (int, kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, idx1, unsigned long, idx2)#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 , },
@@ -11620,6 +11623,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,/* PowerPC specific. */ return do_swapcontext (cpu_env, arg1, arg2, arg3);#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);
Signature · 7 lines
2.21.0 -- Andreas Schwab, SUSE Labs, [email protected] GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
Quoted 5 lines · Andreas Schwab
Signed-off-by Andreas Schwab <[email protected]>--- linux-user/syscall.c | 7 +++++++ 1 file changed, 7 insertions(+)
Reviewed-by Laurent Vivier <[email protected]>
Laurent Vivier
AppliedLe 13/05/2019 à 11:02, Andreas Schwab a écrit :
Quoted 21 lines
Signed-off-by Andreas Schwab <[email protected]>--- linux-user/syscall.c | 7 +++++++ 1 file changed, 7 insertions(+)linux-user/syscall.c +3
-0@@ -313,6 +313,9 @@ _syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags)_syscall5 (int, kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, idx1, unsigned long, idx2)#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 , },
linux-user/syscall.c static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, · line 11632
Quoted 10 lines
linux-user/syscall.c +4
-0@@ -11620,6 +11623,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,/* PowerPC specific. */ return do_swapcontext (cpu_env, arg1, arg2, arg3);#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);
Applied to my linux-user branch.
Thanks,
Laurent