Message ID | 20221024232435.3334600-1-richard.henderson@linaro.org |
---|---|
Headers | show |
Series | atomic: Friendlier assertions, avoidance of __sync | expand |
On 10/25/22 01:24, Richard Henderson wrote: > The current use of _Static_assert, via QEMU_BUILD_BUG_ON, requires > the user have #if conditionals to avoid the statement from appearing > in the preprocessed file at all. Introduce a new primitive that > allows normal C conditionals and dead-code elimination. > > Remove all use of __sync* builtins in favor of __atomic*. > We have required them since 47345e71247, last year, and > should have removed these at that point. My bad. > > > r~ > > > Richard Henderson (4): > include/qemu/osdep: Add qemu_build_assert > include/qemu/atomic: Use qemu_build_assert > include/qemu/thread: Use qatomic_* functions > include/qemu/atomic128: Avoid __sync_val_compare_and_swap_16 > > include/qemu/atomic.h | 16 ++++++++-------- > include/qemu/atomic128.h | 8 +------- > include/qemu/osdep.h | 8 ++++++++ > include/qemu/thread.h | 8 ++++---- > meson.build | 3 ++- > 5 files changed, 23 insertions(+), 20 deletions(-) > For patches 1-3, Acked-by: Paolo Bonzini <pbonzini@redhat.com> Paolo
On 10/25/22 22:43, Paolo Bonzini wrote: > On 10/25/22 01:24, Richard Henderson wrote: >> The current use of _Static_assert, via QEMU_BUILD_BUG_ON, requires >> the user have #if conditionals to avoid the statement from appearing >> in the preprocessed file at all. Introduce a new primitive that >> allows normal C conditionals and dead-code elimination. >> >> Remove all use of __sync* builtins in favor of __atomic*. >> We have required them since 47345e71247, last year, and >> should have removed these at that point. My bad. >> >> >> r~ >> >> >> Richard Henderson (4): >> include/qemu/osdep: Add qemu_build_assert >> include/qemu/atomic: Use qemu_build_assert >> include/qemu/thread: Use qatomic_* functions >> include/qemu/atomic128: Avoid __sync_val_compare_and_swap_16 >> >> include/qemu/atomic.h | 16 ++++++++-------- >> include/qemu/atomic128.h | 8 +------- >> include/qemu/osdep.h | 8 ++++++++ >> include/qemu/thread.h | 8 ++++---- >> meson.build | 3 ++- >> 5 files changed, 23 insertions(+), 20 deletions(-) >> > > For patches 1-3, > > Acked-by: Paolo Bonzini <pbonzini@redhat.com> Queuing patches 1-3 to tcg-next. r~