qemu/trace
Michael Tokarev 86946a2d83 glib-compat.h: add new thread API emulation on top of pre-2.31 API
Thread API changed in glib-2.31 significantly.  Before that version,
conditionals and mutexes were only allocated dynamically, using
_new()/_free() interface.  in 2.31 and up, they're allocated statically
as regular variables, and old interface is deprecated.

(Note: glib docs says the new interface is available since version
2.32, but it was actually introduced in version 2.31).

Create the new interface using old primitives, by providing non-opaque
definitions of the base types (GCond and GMutex) using GOnces.

Replace #ifdeffery around GCond and GMutex in trace/simple.c and
coroutine-gthread.c too because it does not work anymore with the new
glib-compat.h.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[Use GOnce to support lazy initialization; introduce CompatGMutex
 and CompatGCond.  - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-06-10 07:44:01 +02:00
..
Makefile.objs trace: Multi-backend tracing 2014-06-09 15:43:40 +02:00
control-internal.h trace: Multi-backend tracing 2014-06-09 15:43:40 +02:00
control.c trace: Replace fprintf with error_report and print location 2014-06-09 15:43:40 +02:00
control.h trace: Multi-backend tracing 2014-06-09 15:43:40 +02:00
event-internal.h trace: Provide a generic tracing event descriptor 2013-03-28 14:19:57 +01:00
ftrace.c trace: Multi-backend tracing 2014-06-09 15:43:40 +02:00
ftrace.h trace: Multi-backend tracing 2014-06-09 15:43:40 +02:00
simple.c glib-compat.h: add new thread API emulation on top of pre-2.31 API 2014-06-10 07:44:01 +02:00
simple.h trace: Multi-backend tracing 2014-06-09 15:43:40 +02:00