qemu-e2k/qom
Alex Bennée b6b3ccfda0 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.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20160930213106.20186-7-alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-10-04 10:00:26 +02:00
..
container.c qom: Clean up includes 2016-02-04 17:41:30 +00:00
cpu.c trace: Add event "guest_cpu_reset" 2016-09-28 19:17:55 +01:00
Makefile.objs qom: allow QOM to be linked into tools binaries 2015-09-15 14:35:39 +01:00
object_interfaces.c opts-visitor: Favor new visit_free() function 2016-07-06 10:52:04 +02:00
object.c qom/object: update class cache atomically 2016-10-04 10:00:26 +02:00
qom-qobject.c qapi: Add new visit_complete() function 2016-07-06 10:52:04 +02:00
trace-events trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00