Received: from eggs.gnu.org ([2001:4830:134:3::10]:60445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wg9sL-0005d6-HS for qemu-devel@nongnu.org; Fri, 02 May 2014 05:35:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wg9sC-0005bJ-Hr for qemu-devel@nongnu.org; Fri, 02 May 2014 05:35:25 -0400 Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]:39351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wg9sC-0005aj-Ax for qemu-devel@nongnu.org; Fri, 02 May 2014 05:35:16 -0400 Received: by mail-we0-f181.google.com with SMTP id q58so4224935wes.40 for ; Fri, 02 May 2014 02:35:15 -0700 (PDT) Date: Fri, 2 May 2014 11:35:12 +0200 From: Stefan Hajnoczi Message-ID: <20140502093512.GG8005@stefanha-thinkpad.redhat.com> References: <1391434310-9990-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1391434310-9990-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/3] glib: move compat functions into glib-compat.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Peter Maydell , Michael Tokarev , qemu-devel@nongnu.org, Anthony Liguori On Mon, Feb 03, 2014 at 02:31:47PM +0100, Stefan Hajnoczi wrote: > glib has deprecated APIs like GStaticMutex, g_thread_create(), and others. In > QEMU support both old and new APIs since using deprecated APIs would flood us > with warnings but legacy distros must continue to build the QEMU source code. > > This patch series reduces ifdefs by moving glib compat functions into > glib-compat.h, where they can be reused. > > There are two strategies for compat functions: > > 1. Implement the new API using the deprecated API. This compat function is > used when building on a legacy host. Sometimes the API semantics are so > different that this option is not feasible. > > 2. Add a new wrapper API that maps to the deprecated API. The wrapper is not > marked deprecated so it works as a drop-in replacement but is implemented > using the new API where possible. > > Stefan Hajnoczi (3): > glib: move g_poll() replacement into glib-compat.h > glib: add g_thread_new() compat function > glib: add compat wrapper for GStaticMutex > > coroutine-gthread.c | 26 ++++++++++---------------- > include/glib-compat.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ > include/qemu-common.h | 12 ------------ > trace/simple.c | 31 ++++++++++--------------------- > 4 files changed, 64 insertions(+), 49 deletions(-) Ping^2? Also CCed mjt because he posted a related series. Stefan