From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnnjG-0003PH-NK for qemu-devel@nongnu.org; Fri, 23 May 2014 07:33:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnnjB-0004FC-1x for qemu-devel@nongnu.org; Fri, 23 May 2014 07:33:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnnjA-0004Eq-HI for qemu-devel@nongnu.org; Fri, 23 May 2014 07:33:32 -0400 Message-ID: <537F3202.6090003@redhat.com> Date: Fri, 23 May 2014 13:33:22 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1400814150-31666-1-git-send-email-famz@redhat.com> <1400814150-31666-2-git-send-email-famz@redhat.com> <537F0542.7050703@redhat.com> <537F0624.7030609@msgid.tls.msk.ru> <537F1423.2080307@redhat.com> <537F168A.9080604@msgid.tls.msk.ru> In-Reply-To: <537F168A.9080604@msgid.tls.msk.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] Makefile: Link vscclient with libqemuutil.a and libqemustub.a List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev , Fam Zheng , qemu-devel@nongnu.org Cc: Peter Maydell , Stefan Weil , Michael Roth , Christophe Fergeau , Alon Levy , Stefan Hajnoczi , =?ISO-8859-1?Q?Alex_Benn=E9e?= , Richard Henderson Il 23/05/2014 11:36, Michael Tokarev ha scritto: > Here's the last incarnation: > > http://comments.gmane.org/gmane.comp.emulators.qemu/271372 > > The prob was re-defining GCond to GCond* in the _thin_ compat > layer I wanted to add for _old_ glib (so that all the code uses > new glib api, because that's what people know now). That one > is fun indeed, but it allows us to go without inventing a thick > layer which will just complicate things and add unnecessary and > qemu-specific API -- to me it is too much cost for supporting > obsolete glib thread api. > > FWIW, the old glib thread api is a frozen code, so we shouldn't > expect any changes in there. And my changes does not wrap new > api (except of adding tiny wrappers for static initializers). I liked your approach, but at the same time there is a problem: It would break completely any API that includes GMutex/GCond. GTK itself exposes a GMutex when you use gtk/gtk.h. We can exploit the macro vs. inline function difference to our advantage, to keep the wrapper small (just s/GMutex/CompatGMutex/;s/GCond/CompatGCond/) and also type safe. I'll post my version in a second. Paolo