qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>,
	qemu-devel@nongnu.org, stefanha@redhat.com, mjt@mls.msk.ru
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	[thread overview]
Message-ID: <20140606132819.GK14322@stefanha-thinkpad> (raw)
In-Reply-To: <1400845497-29618-2-git-send-email-pbonzini@redhat.com>

On Fri, May 23, 2014 at 01:44:54PM +0200, Paolo Bonzini wrote:
> From: Michael Tokarev <mjt@tls.msk.ru>
> 
> 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: Alon Levy <alevy@redhat.com>
> Tested-by: Alon Levy <alevy@redhat.com>
> [Use GOnce to support lazy initialization; introduce CompatGMutex
>  and CompatGCond.  - Paolo]
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  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 <stefanha@redhat.com>

  parent reply	other threads:[~2014-06-06 13:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 11:44 [Qemu-devel] [PATCH 0/4] standalone libcacard Paolo Bonzini
2014-05-23 11:44 ` [Qemu-devel] [PATCH 1/4] glib-compat.h: add new thread API emulation on top of pre-2.31 API Paolo Bonzini
2014-05-23 15:03   ` Stefan Hajnoczi
2014-05-23 15:13     ` Paolo Bonzini
2014-05-23 15:24       ` Stefan Hajnoczi
2014-06-06 13:28   ` Stefan Hajnoczi [this message]
2014-05-23 11:44 ` [Qemu-devel] [PATCH 2/4] vscclient: use glib thread primitives not qemu Paolo Bonzini
2014-05-23 11:44 ` [Qemu-devel] [PATCH 3/4] libcacard: replace qemu thread primitives with glib ones Paolo Bonzini
2014-05-23 11:44 ` [Qemu-devel] [PATCH 4/4] libcacard: actually use symbols file Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140606132819.GK14322@stefanha-thinkpad \
    --to=stefanha@gmail.com \
    --cc=mjt@mls.msk.ru \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).