CC util/qemu-coroutine-lock.o /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:371:5: warning: calling function 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_mutex_lock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:371:5: warning: calling function 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:374:9: warning: calling function 'qemu_co_queue_wait' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_queue_wait(&lock->queue, &lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:374:9: warning: calling function 'qemu_co_queue_wait' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:377:5: warning: calling function 'qemu_co_mutex_unlock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_mutex_unlock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:377:5: warning: calling function 'qemu_co_mutex_unlock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:390:9: warning: calling function 'qemu_co_queue_restart_all' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_queue_restart_all(&lock->queue); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:390:9: warning: calling function 'qemu_co_queue_restart_all' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:394:9: warning: calling function 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_mutex_lock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:394:9: warning: calling function 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:399:13: warning: calling function 'qemu_co_queue_next' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_queue_next(&lock->queue); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:399:13: warning: calling function 'qemu_co_queue_next' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:402:5: warning: calling function 'qemu_co_mutex_unlock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_mutex_unlock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:402:5: warning: calling function 'qemu_co_mutex_unlock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:407:5: warning: calling function 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_mutex_lock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:407:5: warning: calling function 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:410:9: warning: calling function 'qemu_co_queue_wait' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis] qemu_co_queue_wait(&lock->queue, &lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:410:9: warning: calling function 'qemu_co_queue_wait' requires holding role '_coroutine_fn' exclusively [-Wthread-safety-analysis]
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- include/qemu/coroutine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index ec55fe295c..5698414c14 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -255,20 +255,20 @@ 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 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); /** * Yield the coroutine for a given duration -- 2.13.1.395.gf7b71de06