Re: [Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield

2013-08-08 Thread Gabriel Kerneis
On Thu, Aug 08, 2013 at 02:29:39AM +0100, Charlie Shepherd wrote: On 07/08/2013 23:13, Gabriel Kerneis wrote: On Wed, Aug 07, 2013 at 09:18:05PM +0200, Stefan Hajnoczi wrote: I guess the practical problem is that CPC will get upset that it's being called by the coroutine implementation from

Re: [Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield

2013-08-08 Thread Charlie Shepherd
On 08/08/2013 07:16, Gabriel Kerneis wrote: On Thu, Aug 08, 2013 at 02:29:39AM +0100, Charlie Shepherd wrote: On 07/08/2013 23:13, Gabriel Kerneis wrote: On Wed, Aug 07, 2013 at 09:18:05PM +0200, Stefan Hajnoczi wrote: I guess the practical problem is that CPC will get upset that it's being

Re: [Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield

2013-08-08 Thread Gabriel Kerneis
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

Re: [Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield

2013-08-07 Thread Stefan Hajnoczi
On Mon, Aug 05, 2013 at 08:44:04PM +0200, Charlie Shepherd wrote: From: Charlie Shepherd cs...@cam.ac.uk While it only really makes sense to call qemu_coroutine_self() in a coroutine context, it cannot actually yield execution itself, so remove the coroutine_fn annotation. ---

Re: [Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield

2013-08-07 Thread Gabriel Kerneis
On Wed, Aug 07, 2013 at 09:18:05PM +0200, Stefan Hajnoczi wrote: I guess the practical problem is that CPC will get upset that it's being called by the coroutine implementation from non-coroutine contexts. But is it really the case? If Charlie added an annotation, it probably means that in

Re: [Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield

2013-08-07 Thread Charlie Shepherd
On 07/08/2013 20:18, Stefan Hajnoczi wrote: On Mon, Aug 05, 2013 at 08:44:04PM +0200, Charlie Shepherd wrote: From: Charlie Shepherd cs...@cam.ac.uk While it only really makes sense to call qemu_coroutine_self() in a coroutine context, it cannot actually yield execution itself, so remove the

Re: [Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield

2013-08-07 Thread Charlie Shepherd
On 07/08/2013 23:13, Gabriel Kerneis wrote: On Wed, Aug 07, 2013 at 09:18:05PM +0200, Stefan Hajnoczi wrote: I guess the practical problem is that CPC will get upset that it's being called by the coroutine implementation from non-coroutine contexts. But is it really the case? If Charlie added

[Qemu-devel] [PATCH 2/5] qemu_coroutine_self should not be marked coroutine_fn as it cannot yield

2013-08-05 Thread Charlie Shepherd
From: Charlie Shepherd cs...@cam.ac.uk While it only really makes sense to call qemu_coroutine_self() in a coroutine context, it cannot actually yield execution itself, so remove the coroutine_fn annotation. --- include/block/coroutine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)