unicorn/qemu/qom
Alex Bennée 12d7e946a1
qom/object: update class cache atomically
The idiom CPU_GET_CLASS(cpu) is fairly extensively used in various
threads and trips of ThreadSanitizer due to the fact it updates
obj->class->object_cast_cache behind the scenes. As this is just a
fast-path cache there is no need to lock updates.

However to ensure defined C11 behaviour across threads we need to use
the plain atomic_read/set primitives and keep the sanitizer happy.

Backports commit b6b3ccfda015dcd5ab50f70c189ee5cc6c622e91 from qemu
2018-02-26 05:06:40 -05:00
..
container.c qom: Allow properties to be registered against classes 2018-02-21 21:00:56 -05:00
cpu.c tcg: Remove needless CPUState::current_tb 2018-02-23 23:45:42 -05:00
Makefile.objs import 2015-08-21 15:04:50 +08:00
object.c qom/object: update class cache atomically 2018-02-26 05:06:40 -05:00
qom-qobject.c qapi: Add new visit_complete() function 2018-02-25 01:20:03 -05:00