qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] glib-compat.h: add new thread API emulation


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 1/4] glib-compat.h: add new thread API emulation on top of pre-2.31 API
Date: Fri, 6 Jun 2014 15:28:19 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, May 23, 2014 at 01:44:54PM +0200, Paolo Bonzini wrote:
> From: Michael Tokarev <address@hidden>
> 
> 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 <address@hidden>
> Reviewed-by: Alon Levy <address@hidden>
> Tested-by: Alon Levy <address@hidden>
> [Use GOnce to support lazy initialization; introduce CompatGMutex
>  and CompatGCond.  - Paolo]
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  coroutine-gthread.c   |   29 +++---------
>  include/glib-compat.h |  119 
> +++++++++++++++++++++++++++++++++++++++++++++++++
>  trace/simple.c        |   50 +++++----------------
>  3 files changed, 138 insertions(+), 60 deletions(-)

You clever devil :-)

Reviewed-by: Stefan Hajnoczi <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]