[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] rcutorture: fix compilation on 32-bit ppc

From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] rcutorture: fix compilation on 32-bit ppc
Date: Sat, 21 Mar 2015 15:44:01 +0000

On 21 March 2015 at 15:34, Paolo Bonzini <address@hidden> wrote:
> 32-bit PPC cannot do atomic operations on long long.  Inside the loops,
> we are already using local counters that are summed at the end of
> the run---with one exception in rcu_read_stress_test: fix it to use
> the same technique.  Then, use a mutex to protect the global counts.
> Performance does not matter there because every thread will only enter
> the critical section once.
> Remaining uses of atomic instructions are for ints or pointers.

I don't suppose there's a way to make the atomic functions
enforce that 'not for anything that larger than pointer type',
is there? It would be nice if this kind of bug caused compile
failures on all 32-bit systems rather than only ppc-32...

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]