* [Qemu-devel] [PATCH] linux-user: Implement membarrier syscall
@ 2019-05-13 9:02 Andreas Schwab
2019-05-13 11:02 ` Laurent Vivier
2020-02-18 21:33 ` Laurent Vivier
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Schwab @ 2019-05-13 9:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Riku Voipio, Laurent Vivier
Signed-off-by: Andreas Schwab <schwab@suse.de>
---
linux-user/syscall.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f5ff6f5dc8..80399f4eb0 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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);
--
2.21.0
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user: Implement membarrier syscall
2019-05-13 9:02 [Qemu-devel] [PATCH] linux-user: Implement membarrier syscall Andreas Schwab
@ 2019-05-13 11:02 ` Laurent Vivier
2020-02-18 21:33 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2019-05-13 11:02 UTC (permalink / raw)
To: Andreas Schwab, qemu-devel; +Cc: Riku Voipio
On 13/05/2019 11:02, Andreas Schwab wrote:
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
> linux-user/syscall.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user: Implement membarrier syscall
2019-05-13 9:02 [Qemu-devel] [PATCH] linux-user: Implement membarrier syscall Andreas Schwab
2019-05-13 11:02 ` Laurent Vivier
@ 2020-02-18 21:33 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2020-02-18 21:33 UTC (permalink / raw)
To: Andreas Schwab, qemu-devel; +Cc: Riku Voipio
Le 13/05/2019 à 11:02, Andreas Schwab a écrit :
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
> linux-user/syscall.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index f5ff6f5dc8..80399f4eb0 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -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);
>
Applied to my linux-user branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-18 21:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13 9:02 [Qemu-devel] [PATCH] linux-user: Implement membarrier syscall Andreas Schwab
2019-05-13 11:02 ` Laurent Vivier
2020-02-18 21:33 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).