diff options
author | Alberto Faria <afaria@redhat.com> | 2022-10-13 14:36:53 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2022-10-27 20:14:11 +0200 |
commit | d63f006a58b32f6df51ca12ac9d9e87b648eb617 (patch) | |
tree | 878a0fa9117c7769e628a6d0199dafac4474e72c /include | |
parent | 16bb776f5b48e045f5eb5d105ee74135bfc781dd (diff) | |
download | qemu-d63f006a58b32f6df51ca12ac9d9e87b648eb617.zip qemu-d63f006a58b32f6df51ca12ac9d9e87b648eb617.tar.gz qemu-d63f006a58b32f6df51ca12ac9d9e87b648eb617.tar.bz2 |
coroutine-lock: add missing coroutine_fn annotation to prototypes
The functions are marked coroutine_fn in the definition.
Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-7-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/coroutine.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index aae33cc..d848489 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -276,7 +276,7 @@ void qemu_co_rwlock_init(CoRwlock *lock); * of a parallel writer, control is transferred to the caller of the current * coroutine. */ -void qemu_co_rwlock_rdlock(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_rdlock(CoRwlock *lock); /** * Write Locks the CoRwlock from a reader. This is a bit more efficient than @@ -285,7 +285,7 @@ void qemu_co_rwlock_rdlock(CoRwlock *lock); * to the caller of the current coroutine; another writer might run while * @qemu_co_rwlock_upgrade blocks. */ -void qemu_co_rwlock_upgrade(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_upgrade(CoRwlock *lock); /** * Downgrades a write-side critical section to a reader. Downgrading with @@ -293,20 +293,20 @@ void qemu_co_rwlock_upgrade(CoRwlock *lock); * followed by @qemu_co_rwlock_rdlock. This makes it more efficient, but * may also sometimes be necessary for correctness. */ -void qemu_co_rwlock_downgrade(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_downgrade(CoRwlock *lock); /** * Write Locks the mutex. If the lock cannot be taken immediately because * of a parallel reader, control is transferred to the caller of the current * coroutine. */ -void qemu_co_rwlock_wrlock(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_wrlock(CoRwlock *lock); /** * Unlocks the read/write lock and schedules the next coroutine that was * waiting for this lock to be run. */ -void qemu_co_rwlock_unlock(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_unlock(CoRwlock *lock); typedef struct QemuCoSleep { Coroutine *to_wake; |