From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: stefanha@redhat.com, mjt@mls.msk.ru
Subject: [Qemu-devel] [PATCH 0/4] standalone libcacard
Date: Fri, 23 May 2014 13:44:53 +0200 [thread overview]
Message-ID: <1400845497-29618-1-git-send-email-pbonzini@redhat.com> (raw)
This series picks up Michael Tokarev's patches, avoiding the
nasty type redefinition for GMutex/GCond and also sticking to
the same API as glib 2.32+ (apart from the type name).
Keeping the same function names makes usage simpler, and is
type safe.
We could in principle drop QemuThread now that the API is the
same. However:
- glib 2.32 also dropped custom thread implementations, which
we may want sooner or later to use priority inheritance
- the POSIX implementation of GMutex is particularly inefficient
(it is basically the same that we're doing here with GOnce) and uses
malloc to get a pthread_mutex_t, with a little extra cost on each lock
and unlock for the test and the pointer-chase. It would be nicer if
glib at least provided a futex-based implementation on Linux.
Comments?
Paolo
Michael Tokarev (4):
glib-compat.h: add new thread API emulation on top of pre-2.31 API
vscclient: use glib thread primitives not qemu
libcacard: replace qemu thread primitives with glib ones
libcacard: actually use symbols file
coroutine-gthread.c | 29 +++---------
include/glib-compat.h | 119 +++++++++++++++++++++++++++++++++++++++++++++++++
libcacard/Makefile | 10 +---
libcacard/event.c | 23 ++++-----
libcacard/vreader.c | 18 +++----
libcacard/vscclient.c | 70 +++++++++++++++--------------
trace/simple.c | 50 +++++----------------
7 files changed, 195 insertions(+), 124 deletions(-)
next reply other threads:[~2014-05-23 11:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 11:44 Paolo Bonzini [this message]
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
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=1400845497-29618-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=mjt@mls.msk.ru \
--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).