Received: from eggs.gnu.org ([208.118.235.92]:49215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVYhr-0001gY-CY for qemu-devel@nongnu.org; Thu, 25 Apr 2013 22:48:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVYhq-0007iz-Gq for qemu-devel@nongnu.org; Thu, 25 Apr 2013 22:48:15 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:40357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVYhq-0007ir-BC for qemu-devel@nongnu.org; Thu, 25 Apr 2013 22:48:14 -0400 Received: by mail-pd0-f182.google.com with SMTP id 14so613351pdj.13 for ; Thu, 25 Apr 2013 19:48:13 -0700 (PDT) From: Liu Ping Fan Date: Fri, 26 Apr 2013 10:47:23 +0800 Message-Id: <1366944455-14239-3-git-send-email-qemulist@gmail.com> In-Reply-To: <1366944455-14239-1-git-send-email-qemulist@gmail.com> References: <1366944455-14239-1-git-send-email-qemulist@gmail.com> Subject: [Qemu-devel] [RFC PATCH v5 02/14] net: introduce bind_ctx to NetClientInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mdroth , Jan Kiszka , Stefan Hajnoczi , Anthony Liguori , Paolo Bonzini From: Liu Ping Fan Introduce bind_ctx interface for NetClientState. It will help to bind NetClientState with a GSource. Currently, these GSource attached with default context, but in future, after resolving all the race condition in network layer, NetClientStates can run on different threads Signed-off-by: Liu Ping Fan --- include/net/net.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index cb049a1..88332d2 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -44,6 +44,7 @@ typedef ssize_t (NetReceiveIOV)(NetClientState *, const struct iovec *, int); typedef void (NetCleanup) (NetClientState *); typedef void (LinkStatusChanged)(NetClientState *); typedef void (NetClientDestructor)(NetClientState *); +typedef void (NetClientBindCtx)(NetClientState *, GMainContext *); typedef struct NetClientInfo { NetClientOptionsKind type; @@ -55,6 +56,7 @@ typedef struct NetClientInfo { NetCleanup *cleanup; LinkStatusChanged *link_status_changed; NetPoll *poll; + NetClientBindCtx *bind_ctx; } NetClientInfo; struct NetClientState { -- 1.7.4.4