From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZakh-0001cS-Nc for qemu-devel@nongnu.org; Tue, 07 May 2013 01:47:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZakg-0007Sx-RM for qemu-devel@nongnu.org; Tue, 07 May 2013 01:47:51 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:55960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZakg-0007So-LV for qemu-devel@nongnu.org; Tue, 07 May 2013 01:47:50 -0400 Received: by mail-pa0-f45.google.com with SMTP id lj1so234867pab.32 for ; Mon, 06 May 2013 22:47:49 -0700 (PDT) From: Liu Ping Fan Date: Tue, 7 May 2013 13:46:50 +0800 Message-Id: <1367905622-21038-3-git-send-email-qemulist@gmail.com> In-Reply-To: <1367905622-21038-1-git-send-email-qemulist@gmail.com> References: <1367905622-21038-1-git-send-email-qemulist@gmail.com> Subject: [Qemu-devel] [PATCH v1 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