diff options
| author | Stefan Hajnoczi | 2016-09-27 17:18:34 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi | 2016-09-28 18:11:23 +0200 |
| commit | f643e469f31df735fd5c42ab317f96ebfe749871 (patch) | |
| tree | dc93c449d6963efb3e5c553442348c390f76d83f /util | |
| parent | libqos: fix qvring_init() (diff) | |
| download | qemu-f643e469f31df735fd5c42ab317f96ebfe749871.tar.gz qemu-f643e469f31df735fd5c42ab317f96ebfe749871.tar.xz qemu-f643e469f31df735fd5c42ab317f96ebfe749871.zip | |
coroutine: add qemu_coroutine_entered() function
See the doc comments for a description of this new coroutine API.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1474989516-18255-2-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'util')
| -rw-r--r-- | util/qemu-coroutine.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index 3cbf225487..737bffa984 100644 --- a/util/qemu-coroutine.c +++ b/util/qemu-coroutine.c @@ -146,3 +146,8 @@ void coroutine_fn qemu_coroutine_yield(void) self->caller = NULL; qemu_coroutine_switch(self, to, COROUTINE_YIELD); } + +bool qemu_coroutine_entered(Coroutine *co) +{ + return co->caller; +} |
