qemu-devel
[Top][All Lists]
Advanced

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

[PATCH 0/4] atomic: Friendlier assertions, avoidance of __sync


From: Richard Henderson
Subject: [PATCH 0/4] atomic: Friendlier assertions, avoidance of __sync
Date: Tue, 25 Oct 2022 09:24:31 +1000

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(-)

-- 
2.34.1




reply via email to

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