qemu-cr16/docs/devel
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
..
atomics.rst qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
bitops.rst
blkdebug.txt docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
blkverify.txt meson: link emulators without Makefile.target 2020-08-21 06:30:40 -04:00
build-system.rst docs: update build system documentation 2020-09-08 11:43:16 +02:00
clocks.rst
conf.py
decodetree.rst docs/devel: Document decodetree no-overlap groups 2020-08-04 16:33:47 +01:00
fuzzing.txt docs/fuzz: add instructions for generating a coverage report 2020-07-21 07:29:18 +02:00
index.rst docs: convert build system documentation to rST 2020-08-21 06:30:45 -04:00
kconfig.rst
loads-stores.rst
lockcnt.txt qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
memory.rst
migration.rst docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
multi-thread-tcg.rst
multiple-iothreads.txt
qapi-code-gen.txt qapi: Reject section markup in definition documentation 2020-09-07 16:35:16 +02:00
rcu.txt qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
replay.txt
reset.rst
s390-dasd-ipl.rst
secure-coding-practices.rst
stable-process.rst
tcg-icount.rst
tcg-plugins.rst plugins: move the more involved plugins to contrib 2020-09-10 10:47:03 +01:00
tcg.rst
testing.rst docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
tracing.txt docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
virtio-migration.txt
writing-qmp-commands.txt