qemu-e2k/target/xtensa
Stefan Hajnoczi d73415a315 qemu/atomic.h: rename atomic_ to qatomic_
clang's C11 atomic_fetch_*() functions only take a C11 atomic type
pointer argument. QEMU uses direct types (int, etc) and this causes a
compiler error when a QEMU code calls these functions in a source file
that also included <stdatomic.h> via a system header file:

  $ CC=clang CXX=clang++ ./configure ... && make
  ../util/async.c:79:17: error: address argument to atomic operation must be a pointer to _Atomic type ('unsigned int *' invalid)

Avoid using atomic_*() names in QEMU's atomic.h since that namespace is
used by <stdatomic.h>. Prefix QEMU's APIs with 'q' so that atomic.h
and <stdatomic.h> can co-exist. I checked /usr/include on my machine and
searched GitHub for existing "qatomic_" users but there seem to be none.

This patch was generated using:

  $ git grep -h -o '\<atomic\(64\)\?_[a-z0-9_]\+' include/qemu/atomic.h | \
    sort -u >/tmp/changed_identifiers
  $ for identifier in $(</tmp/changed_identifiers); do
        sed -i "s%\<$identifier\>%q$identifier%g" \
            $(git grep -I -l "\<$identifier\>")
    done

I manually fixed line-wrap issues and misaligned rST tables.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200923105646.47864-1-stefanha@redhat.com>
2020-09-23 16:07:44 +01:00
..
core-dc232b
core-dc233c
core-de212
core-de233_fpu target/xtensa: import de233_fpu core 2020-08-21 12:53:48 -07:00
core-dsp3400 target/xtensa: import DSP3400 core 2020-08-21 12:56:45 -07:00
core-fsf
core-sample_controller
core-test_kc705_be
core-test_mmuhifi_c3
core-dc232b.c
core-dc233c.c
core-de212.c
core-de233_fpu.c target/xtensa: import de233_fpu core 2020-08-21 12:53:48 -07:00
core-dsp3400.c target/xtensa: import DSP3400 core 2020-08-21 12:56:45 -07:00
core-fsf.c
core-sample_controller.c
core-test_kc705_be.c
core-test_mmuhifi_c3.c
cpu-param.h
cpu-qom.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
cpu.c
cpu.h
dbg_helper.c
exc_helper.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
fpu_helper.c target/xtensa: implement FPU division and square root 2020-08-21 12:48:15 -07:00
gdbstub.c
helper.c
helper.h target/xtensa: implement FPU division and square root 2020-08-21 12:48:15 -07:00
import_core.sh
meson.build target/xtensa: import DSP3400 core 2020-08-21 12:56:45 -07:00
mmu_helper.c
monitor.c
op_helper.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
overlay_tool.h
translate.c target/xtensa: implement FPU division and square root 2020-08-21 12:48:15 -07:00
win_helper.c
xtensa-isa-internal.h
xtensa-isa.c
xtensa-isa.h
xtensa-semi.c