aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-09-22 10:49:22 +0200
committerKevin Wolf <kwolf@redhat.com>2022-10-07 12:11:41 +0200
commit9204028dbbdaf742264c5de40dfcc3dfd43a6355 (patch)
tree290bf02a72cd4f9b742906115ea8ecc09d4fac4c
parent7390b08a2d021d9b5391c0d98fa959c5c2013be2 (diff)
downloadqemu-9204028dbbdaf742264c5de40dfcc3dfd43a6355.zip
qemu-9204028dbbdaf742264c5de40dfcc3dfd43a6355.tar.gz
qemu-9204028dbbdaf742264c5de40dfcc3dfd43a6355.tar.bz2
9p: add missing coroutine_fn annotations
Callers of coroutine_fn must be coroutine_fn themselves, or the call must be within "if (qemu_in_coroutine())". Apply coroutine_fn to functions where this holds. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Greg Kurz <groug@kaod.org> Reviewed-by: Alberto Faria <afaria@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220922084924.201610-25-pbonzini@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--hw/9pfs/9p.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
index 994f952..a523ac3 100644
--- a/hw/9pfs/9p.h
+++ b/hw/9pfs/9p.h
@@ -424,21 +424,24 @@ typedef struct V9fsGetlock
extern int open_fd_hw;
extern int total_open_fd;
-static inline void v9fs_path_write_lock(V9fsState *s)
+static inline void coroutine_fn
+v9fs_path_write_lock(V9fsState *s)
{
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
qemu_co_rwlock_wrlock(&s->rename_lock);
}
}
-static inline void v9fs_path_read_lock(V9fsState *s)
+static inline void coroutine_fn
+v9fs_path_read_lock(V9fsState *s)
{
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
qemu_co_rwlock_rdlock(&s->rename_lock);
}
}
-static inline void v9fs_path_unlock(V9fsState *s)
+static inline void coroutine_fn
+v9fs_path_unlock(V9fsState *s)
{
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
qemu_co_rwlock_unlock(&s->rename_lock);