From patchwork Wed Oct 31 17:45:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 195968 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6FEBC2C0081 for ; Thu, 1 Nov 2012 04:47:21 +1100 (EST) Received: from localhost ([::1]:58585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTcNr-0001pD-Jk for incoming@patchwork.ozlabs.org; Wed, 31 Oct 2012 13:47:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTcNj-0001oQ-K7 for qemu-devel@nongnu.org; Wed, 31 Oct 2012 13:47:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTcNd-0007DD-FW for qemu-devel@nongnu.org; Wed, 31 Oct 2012 13:47:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTcNd-0007Ce-70 for qemu-devel@nongnu.org; Wed, 31 Oct 2012 13:47:05 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9VHiScB002086 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 31 Oct 2012 13:44:28 -0400 Received: from localhost (ovpn-113-84.phx2.redhat.com [10.3.113.84]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9VHiRQx026306; Wed, 31 Oct 2012 13:44:28 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Wed, 31 Oct 2012 15:45:17 -0200 Message-Id: <1351705520-24589-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1351705520-24589-1-git-send-email-lcapitulino@redhat.com> References: <1351705520-24589-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: mdroth@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH 2/5] qemu-ga: win32: add _ov suffix to current GSource functions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org They are specific to virtio-serial code, which implements win32 overlaped I/O. A future commit will add a different kind of I/O. Signed-off-by: Luiz Capitulino Reviewed-by: Michael Roth --- qga/channel-win32.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/qga/channel-win32.c b/qga/channel-win32.c index 16bf44a..c0e19a8 100644 --- a/qga/channel-win32.c +++ b/qga/channel-win32.c @@ -38,7 +38,7 @@ typedef struct GAWatch { * Called by glib prior to polling to set up poll events if polling is needed. * */ -static gboolean ga_channel_prepare(GSource *source, gint *timeout_ms) +static gboolean ga_channel_prepare_ov(GSource *source, gint *timeout_ms) { GAWatch *watch = (GAWatch *)source; GAChannel *c = (GAChannel *)watch->channel; @@ -95,7 +95,7 @@ out: /* * Called by glib after an outstanding read request is completed. */ -static gboolean ga_channel_check(GSource *source) +static gboolean ga_channel_check_ov(GSource *source) { GAWatch *watch = (GAWatch *)source; GAChannel *c = (GAChannel *)watch->channel; @@ -152,7 +152,7 @@ static gboolean ga_channel_check(GSource *source) /* * Called by glib after either prepare or check routines signal readiness */ -static gboolean ga_channel_dispatch(GSource *source, GSourceFunc unused, +static gboolean ga_channel_dispatch_ov(GSource *source, GSourceFunc unused, gpointer user_data) { GAWatch *watch = (GAWatch *)source; @@ -178,21 +178,21 @@ static gboolean ga_channel_dispatch(GSource *source, GSourceFunc unused, return success; } -static void ga_channel_finalize(GSource *source) +static void ga_channel_finalize_ov(GSource *source) { g_debug("finalize"); } -GSourceFuncs ga_channel_watch_funcs = { - ga_channel_prepare, - ga_channel_check, - ga_channel_dispatch, - ga_channel_finalize +GSourceFuncs ga_channel_watch_funcs_ov = { + ga_channel_prepare_ov, + ga_channel_check_ov, + ga_channel_dispatch_ov, + ga_channel_finalize_ov }; -static GSource *ga_channel_create_watch(GAChannel *c) +static GSource *ga_channel_create_watch_ov(GAChannel *c) { - GSource *source = g_source_new(&ga_channel_watch_funcs, sizeof(GAWatch)); + GSource *source = g_source_new(&ga_channel_watch_funcs_ov, sizeof(GAWatch)); GAWatch *watch = (GAWatch *)source; watch->channel = c; @@ -326,7 +326,7 @@ GAChannel *ga_channel_new(GAChannelMethod method, const gchar *path, c->rstate.buf = g_malloc(QGA_READ_COUNT_DEFAULT); c->rstate.ov.hEvent = CreateEvent(&sec_attrs, FALSE, FALSE, NULL); - c->source = ga_channel_create_watch(c); + c->source = ga_channel_create_watch_ov(c); g_source_attach(c->source, NULL); return c; }