On Tue, Apr 29, 2014 at 10:02:25AM +0400, Michael Tokarev wrote:
> 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, re-defining the base
> types (GCond and GMutex) to be pointers.
> 
> 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 <m...@tls.msk.ru>
> ---
>  coroutine-gthread.c   |   30 +++++---------
>  include/glib-compat.h |  103 
> +++++++++++++++++++++++++++++++++++++++++++++++++
>  trace/simple.c        |   50 +++++++-----------------
>  3 files changed, 126 insertions(+), 57 deletions(-)

The approach in this patch is more invasive due to the #ifdef of the
pointer types.

I have another approach here:
https://lists.gnu.org/archive/html/qemu-devel/2014-02/msg00236.html

What do you think?

Stefan

Reply via email to