[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user: Implement atomic_barrier system cal
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user: Implement atomic_barrier system call |
Date: |
Sun, 30 Aug 2015 22:49:59 +0100 |
On 30 August 2015 at 20:29, Timothy E Baldwin
<address@hidden> wrote:
> Implemented atomic_barrier system call using GCC/clang
> builtin __sync_synchronize().
>
> Signed-off-by: Timothy Edward Baldwin <address@hidden>
> ---
> linux-user/syscall.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index bca3424..72d107a 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -9679,7 +9679,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long
> arg1,
> #ifdef TARGET_NR_atomic_barrier
> case TARGET_NR_atomic_barrier:
> {
> - /* Like the kernel implementation and the qemu arm barrier, no-op
> this? */
> + __sync_synchronize();
> ret = 0;
> break;
Again, I think this needs to be handled as part of a wider examination
of what barrier/atomic ops need to do in a multi-threaded-guest
supporting QEMU linux-user mode.
thanks
-- PMM