From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnnuT-0000Kl-P7 for qemu-devel@nongnu.org; Fri, 23 May 2014 07:45:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnnuK-0008W3-Op for qemu-devel@nongnu.org; Fri, 23 May 2014 07:45:13 -0400 Received: from mail-ee0-x231.google.com ([2a00:1450:4013:c00::231]:57069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnnuK-0008Tn-IZ for qemu-devel@nongnu.org; Fri, 23 May 2014 07:45:04 -0400 Received: by mail-ee0-f49.google.com with SMTP id e53so3533461eek.22 for ; Fri, 23 May 2014 04:45:03 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 23 May 2014 13:44:53 +0200 Message-Id: <1400845497-29618-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/4] standalone libcacard List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, mjt@mls.msk.ru 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(-)