On 30 August 2015 at 20:29, Timothy E Baldwin
<t.e.baldwi...@members.leeds.ac.uk> wrote:
> Implemented atomic_barrier system call using GCC/clang
> builtin __sync_synchronize().
>
> Signed-off-by: Timothy Edward Baldwin <t.e.baldwi...@members.leeds.ac.uk>
> ---
>  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

Reply via email to