From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7MHL-0007aQ-4M for qemu-devel@nongnu.org; Thu, 08 Aug 2013 05:13:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7MHI-0002xt-FX for qemu-devel@nongnu.org; Thu, 08 Aug 2013 05:13:07 -0400 Received: from wanbli.kerneis.info ([2001:41d0:8:38ad::1]:51644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7MHI-0002x7-6T for qemu-devel@nongnu.org; Thu, 08 Aug 2013 05:13:04 -0400 Date: Thu, 8 Aug 2013 10:12:31 +0100 From: Gabriel Kerneis Message-ID: <20130808091231.GF5439@kerneis.info> References: <1375728247-1306-1-git-send-email-charlie@ctshepherd.com> <1375728247-1306-3-git-send-email-charlie@ctshepherd.com> <20130807191805.GA16226@stefanha-thinkpad.hitronhub.home> <20130807221336.GA4393@kerneis.info> <5202F483.9020109@ctshepherd.com> <20130808061619.GA4736@kerneis.info> <5203607A.3020104@ctshepherd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5203607A.3020104@ctshepherd.com> Subject: Re: [Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Charlie Shepherd Cc: kwolf@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, pbonzini@redhat.com On Thu, Aug 08, 2013 at 10:10:18AM +0100, Charlie Shepherd wrote: > >Note that qemu_coroutine_self() in principle really needs to be annotated > >coroutine_fn since it accesses (and returns) its execution context. The fact > >that it is implemented with thread-local variables in Qemu is an implementation > >detail, almost a hack (however smart); the "natural" CPC way would be to just > >return the coroutine associated with the current continuation. So keeping the > >annotation definitely makes sense. > > While that would be the natural way, we are going to need the thread > local variables regardless due to the use of the "leader" coroutine > I believe (Stefan is this correct?). Sure. I was simply pointing out that from a "philosophical" point-of-view, it makes more sense to keep it coroutine_fn. -- Gabriel