> Is tsan happy with the way seqlocks are written right now?
I honestly don't know. But if there are tsan bugs there's
not much we can do. The alternative below has overhead on
ARM and PPC and does not quite fit in atomic.h.
In any case, a bigger issue is that this patch breaks on
32-bit
On Mon, Oct 10, 2016 at 15:59:04 +0200, Paolo Bonzini wrote:
> There is a data race if the variable is written concurrently to the
> read. In C11 this has undefined behavior. Use atomic_read. The
> write side does not need atomic_set, because it is protected by a
> mutex.
Is tsan happy with
Paolo Bonzini writes:
> There is a data race if the variable is written concurrently to the
> read. In C11 this has undefined behavior. Use atomic_read. The
> write side does not need atomic_set, because it is protected by a
> mutex.
>
> Signed-off-by: Paolo Bonzini
There is a data race if the variable is written concurrently to the
read. In C11 this has undefined behavior. Use atomic_read. The
write side does not need atomic_set, because it is protected by a
mutex.
Signed-off-by: Paolo Bonzini
---
cpus.c | 9 +
1 file