From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKliV-0004sa-19 for qemu-devel@nongnu.org; Fri, 13 May 2011 02:19:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKliU-0005JF-2S for qemu-devel@nongnu.org; Fri, 13 May 2011 02:19:14 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:40666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKliT-0005JA-SZ for qemu-devel@nongnu.org; Fri, 13 May 2011 02:19:14 -0400 Received: by gwb19 with SMTP id 19so928952gwb.4 for ; Thu, 12 May 2011 23:19:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1305233867-4367-3-git-send-email-jvrao@linux.vnet.ibm.com> References: <1305233867-4367-1-git-send-email-jvrao@linux.vnet.ibm.com> <1305233867-4367-3-git-send-email-jvrao@linux.vnet.ibm.com> Date: Fri, 13 May 2011 07:19:13 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 02/25] [virtio-9p] Change all pdu handlers to coroutines. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Venkateswararao Jujjuri (JV)" Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com On Thu, May 12, 2011 at 9:57 PM, Venkateswararao Jujjuri (JV) wrote: > +typedef struct V9fsCoPdu { > + =A0 =A0V9fsPDU *pdu; > + =A0 =A0V9fsState *s; > + =A0 =A0Coroutine *coroutine; > +} V9fsCoPdu; How about adding the V9fsState *s field to V9fsPDU? Then you do not need this new V9fsCoPdu struct and all the extracting fields/freeing copdu. You can use qemu_coroutine_self() if it is necessary to give someone a reference to your coroutine. Stefan