qemu/linux-user/hppa
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
..
cpu_loop.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
meson.build meson: linux-user 2020-08-21 06:30:38 -04:00
signal.c linux-user: Make sigaltstack stacks per-thread 2019-07-26 19:24:33 +02:00
sockbits.h Supply missing header guards 2019-06-12 13:20:21 +02:00
syscall.tbl linux-user: update syscall.tbl from linux 0bf999f9c5e7 2020-03-20 16:02:00 +01:00
syscallhdr.sh linux-user, hppa: add syscall table generation support 2020-03-20 16:02:00 +01:00
target_cpu.h linux-user: Introduce cpu_clone_regs_parent 2019-11-06 13:43:25 +01:00
target_elf.h linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
target_fcntl.h linux-user: move hppa fcntl definitions to hppa/target_fcntl.h 2018-06-04 01:30:44 +02:00
target_signal.h linux-user: add missing TARGET_SIGRTMIN for hppa 2020-02-12 18:56:22 +01:00
target_structs.h linux-user: Add HPPA target_structs.h 2017-01-23 09:52:39 -08:00
target_syscall.h linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory 2020-08-27 12:29:50 +02:00
termbits.h linux-user: Add missing termbits types and values definitions 2020-08-27 12:29:50 +02:00