qemu-e2k/include/block
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
..
accounting.h block: add empty account cookie type 2019-10-10 10:56:18 +02:00
aio-wait.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
aio.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
aio_task.h block: introduce aio task pool 2019-10-10 10:56:17 +02:00
block-copy.h block/block-copy: hide structure definitions 2020-03-11 12:42:30 +01:00
block-hmp-cmds.h monitor/hmp: move hmp_info_block* to block-hmp-cmds.c 2020-03-09 18:20:21 +00:00
block.h block: Add bdrv_supports_compressed_writes() 2020-09-07 12:31:31 +02:00
block_backup.h block/backup: drop unused synchronization interface 2018-12-14 11:52:40 +01:00
block_int.h block: Leave BDS.backing_{file,format} constant 2020-09-07 12:31:31 +02:00
blockjob.h blockdev: blockdev_mark_auto_del: drop usage of bs->job 2019-06-18 16:41:10 +02:00
blockjob_int.h job: drop job_drain 2019-09-10 08:58:43 +02:00
dirty-bitmap.h block/dirty-bitmap: add bdrv_has_named_bitmaps helper 2020-05-28 13:15:22 -05:00
nbd.h nbd: Use ERRP_GUARD() 2020-07-10 15:18:09 +02:00
nvme.h hw/block/nvme: be consistent about zeros vs zeroes 2020-09-02 08:48:50 +02:00
qapi.h qapi: Allow getting flat output from 'query-named-block-nodes' 2020-02-20 16:43:42 +01:00
qdict.h block: Factor out qobject_input_visitor_new_flat_confused() 2018-06-15 14:49:44 +02:00
raw-aio.h block/io_uring: implements interfaces for io_uring 2020-01-30 20:59:41 +00:00
snapshot.h block/snapshot: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
thread-pool.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
throttle-groups.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
write-threshold.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00