block/mirror: add missing coroutine_fn annotations
commit537c3d4f64297911a5b70a151926cd7851bbf752
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 13 Dec 2018 11:24:34 +0000 (13 11:24 +0000)
committerKevin Wolf <kwolf@redhat.com>
Fri, 14 Dec 2018 10:55:02 +0000 (14 11:55 +0100)
treeb2a015b028fa9d0c8c71b1be4693f32fdece07ca
parent2c26e648e4350079b0c86a6627b2d3566c3709c0
block/mirror: add missing coroutine_fn annotations

Marking a function coroutine_fn currently has no effect on the compiler,
but it documents that this function must be called from coroutine
context and it may yield.  This is important information for the
programmer.

Also, if we ever transition to a stackless coroutine implementation,
then it's likely that the annotation will become mandatory so the
compiler can use the correct calling convention for coroutine functions.

Cc: Max Reitz <mreitz@redhat.com>
Cc: John Snow <jsnow@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/mirror.c