qemu/qga
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
..
installer meson: convert qemu-ga 2020-08-21 06:30:12 -04:00
vss-win32 meson: convert dummy Windows qga/qemu-ga target 2020-08-21 06:30:12 -04:00
channel-posix.c util: rename qemu_open() to qemu_open_old() 2020-09-16 10:33:48 +01:00
channel-win32.c qga: Fix a memory leak 2020-03-09 13:36:15 +01:00
channel.h
commands-common.h qga: Extract qmp_guest_file_read() to common commands.c 2020-04-15 09:15:53 -05:00
commands-posix.c util: rename qemu_open() to qemu_open_old() 2020-09-16 10:33:48 +01:00
commands-win32.c qga/commands-win32: Fix problem with redundant protype declaration 2020-09-16 08:41:06 +02:00
commands.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
guest-agent-command-state.c
guest-agent-core.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
main.c qga: fix assert regression on guest-shutdown 2020-07-13 17:17:08 -05:00
meson.build meson: install $localstatedir/run for qga 2020-09-01 01:51:52 -04:00
qapi-schema.json qga: add command guest-get-devices for reporting VirtIO devices 2020-09-12 20:37:48 -05:00
service-win32.c
service-win32.h
vss-win32.c
vss-win32.h