[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 1/3] coroutine: add qemu_coroutine_
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 1/3] coroutine: add qemu_coroutine_entered() function |
Date: |
Tue, 27 Sep 2016 17:29:11 +0100 |
On Tue, Sep 27, 2016 at 5:20 PM, Paolo Bonzini <address@hidden> wrote:
>
>
> On 27/09/2016 16:06, Stefan Hajnoczi wrote:
>> See the doc comments for a description of this new coroutine API.
>>
>> Signed-off-by: Stefan Hajnoczi <address@hidden>
>> ---
>> include/qemu/coroutine.h | 13 +++++++++++++
>> util/qemu-coroutine.c | 5 +++++
>> 2 files changed, 18 insertions(+)
>>
>> diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
>> index 29a2078..e6a60d5 100644
>> --- a/include/qemu/coroutine.h
>> +++ b/include/qemu/coroutine.h
>> @@ -92,6 +92,19 @@ Coroutine *coroutine_fn qemu_coroutine_self(void);
>> */
>> bool qemu_in_coroutine(void);
>>
>> +/**
>> + * Return true if the coroutine is currently entered
>> + *
>> + * A coroutine is "entered" if it has not yielded from the current
>> + * qemu_coroutine_enter() call used to run it. This does not mean that the
>> + * coroutine is currently executing code since it may have transferred
>> control
>> + * to another coroutine using qemu_coroutine_enter().
>> + *
>> + * When several coroutines enter each other there may be no way to know
>> which
>> + * ones have already been entered. In such situations this function can be
>> + * used to avoid recursively entering coroutines.
>> + */
>> +bool qemu_coroutine_entered(Coroutine *co);
>
> Perhaps qemu_coroutine_running is a better name?
I find "running" confusing since the coroutine may not actually be
currently executing (as mentioned in the doc comment).
Stefan
[Qemu-block] [PATCH 2/3] test-coroutine: test qemu_coroutine_entered(), Stefan Hajnoczi, 2016/09/27
[Qemu-block] [PATCH 3/3] linux-aio: fix re-entrant completion processing, Stefan Hajnoczi, 2016/09/27
- Re: [Qemu-block] [PATCH 3/3] linux-aio: fix re-entrant completion processing, Roman Penyaev, 2016/09/27
- Re: [Qemu-block] [PATCH 3/3] linux-aio: fix re-entrant completion processing, Stefan Hajnoczi, 2016/09/27
- Re: [Qemu-block] [PATCH 3/3] linux-aio: fix re-entrant completion processing, Roman Penyaev, 2016/09/27
- Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] linux-aio: fix re-entrant completion processing, Fam Zheng, 2016/09/27
- Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] linux-aio: fix re-entrant completion processing, Roman Penyaev, 2016/09/28
- Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] linux-aio: fix re-entrant completion processing, Fam Zheng, 2016/09/28