qemu-patch-raspberry4/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 docs: Create bitops.rst as example of kernel-docs 2019-12-17 19:36:57 +01:00
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 docs/clocks: add device's clock documentation 2020-04-30 15:35:40 +01:00
conf.py docs: Provide separate conf.py for each manual we want 2019-03-07 14:26:46 +00:00
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 docs: Be consistent about capitalization of 'Arm' 2020-03-12 11:20:20 +00:00
loads-stores.rst accel/tcg: Add endian-specific cpu_{ld, st}* operations 2020-05-11 11:22:06 +01:00
lockcnt.txt qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
memory.rst docs: add memory API reference 2019-12-17 19:36:58 +01:00
migration.rst docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
multi-thread-tcg.rst docs/devel: fix grammar in multi-thread-tcg 2020-07-15 11:52:39 +01:00
multiple-iothreads.txt block: Remove bdrv_set_aio_context() 2019-06-04 16:55:58 +02:00
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 replay: document development rules 2019-08-20 17:26:21 +02:00
reset.rst docs/devel/reset.rst: add doc about Resettable interface 2020-01-30 16:02:05 +00:00
s390-dasd-ipl.rst docs: rstfy s390 dasd ipl documentation 2020-02-26 18:57:07 +01:00
secure-coding-practices.rst docs: add Secure Coding Practices to developer docs 2019-05-10 10:53:52 +01:00
stable-process.rst docs/devel: fix stable process doc formatting 2020-01-27 12:13:09 +01:00
tcg-icount.rst docs/devel: add some notes on tcg-icount for developers 2020-07-11 15:53:00 +01:00
tcg-plugins.rst plugins: move the more involved plugins to contrib 2020-09-10 10:47:03 +01:00
tcg.rst docs: Be consistent about capitalization of 'Arm' 2020-03-12 11:20:20 +00:00
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 docs: create config/, devel/ and spin/ subdirectories 2017-06-07 18:22:03 +02:00
writing-qmp-commands.txt monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.c 2019-06-17 20:36:56 +02:00