qemu-irix/include
Emilio G. Cota c5a49c63fa tcg: convert tb->cflags reads to tb_cflags(tb)
Convert all existing readers of tb->cflags to tb_cflags, so that we
use atomic_read and therefore avoid undefined behaviour in C11.

Note that the remaining setters/getters of the field are protected
by tb_lock, and therefore do not need conversion.

Luckily all readers access the field via 'tb->cflags' (so no foo.cflags,
bar->cflags in the code base), which makes the conversion easily
scriptable:

FILES=$(git grep 'tb->cflags' target include/exec/gen-icount.h \
	 accel/tcg/translator.c | cut -f1 -d':' | sort | uniq)

perl -pi -e 's/([^.>])tb->cflags/$1tb_cflags(tb)/g' $FILES
perl -pi -e 's/([a-z->.]*)(->|\.)tb->cflags/tb_cflags($1$2tb)/g' $FILES

Then manually fixed the few errors that checkpatch reported.

Compile-tested for all targets.

Suggested-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2017-10-24 13:53:41 -07:00
..
block
chardev
crypto
disas
exec tcg: convert tb->cflags reads to tb_cflags(tb) 2017-10-24 13:53:41 -07:00
fpu
hw s390x: refactor error handling for MSCH handler 2017-10-20 13:32:10 +02:00
io
libdecnumber
migration
monitor
net
qapi
qemu
qom tcg: Add CPUState cflags_next_tb 2017-10-24 13:53:41 -07:00
scsi
standard-headers
sysemu tpm: move recv_data_callback to TPM interface 2017-10-19 11:42:33 -04:00
ui
elf.h
glib-compat.h
qemu-common.h
qemu-io.h
trace-tcg.h