diff options
author | Fam Zheng <famz@redhat.com> | 2017-03-17 14:14:46 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-03-24 11:48:58 +0100 |
commit | 3d69f821616a578aeed569b3b56e157922819602 (patch) | |
tree | 968bc3f06efe266aeb350d49db04a18bffe52961 | |
parent | ade9c1aac5292ff698fa550adebe794c37d86cc9 (diff) | |
download | qemu-3d69f821616a578aeed569b3b56e157922819602.zip qemu-3d69f821616a578aeed569b3b56e157922819602.tar.gz qemu-3d69f821616a578aeed569b3b56e157922819602.tar.bz2 |
virtio-scsi: Make virtio_scsi_acquire/release public
They will be used in virtio-scsi-dataplane.c as well, so move them to
header.
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170317061447.16243-2-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | hw/scsi/virtio-scsi.c | 14 | ||||
-rw-r--r-- | include/hw/virtio/virtio-scsi.h | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 1dbc4bc..e7466d3 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -422,20 +422,6 @@ static void virtio_scsi_handle_ctrl_req(VirtIOSCSI *s, VirtIOSCSIReq *req) } } -static inline void virtio_scsi_acquire(VirtIOSCSI *s) -{ - if (s->ctx) { - aio_context_acquire(s->ctx); - } -} - -static inline void virtio_scsi_release(VirtIOSCSI *s) -{ - if (s->ctx) { - aio_context_release(s->ctx); - } -} - bool virtio_scsi_handle_ctrl_vq(VirtIOSCSI *s, VirtQueue *vq) { VirtIOSCSIReq *req; diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h index f536f77..8ae0aca 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -121,6 +121,20 @@ typedef struct VirtIOSCSIReq { } req; } VirtIOSCSIReq; +static inline void virtio_scsi_acquire(VirtIOSCSI *s) +{ + if (s->ctx) { + aio_context_acquire(s->ctx); + } +} + +static inline void virtio_scsi_release(VirtIOSCSI *s) +{ + if (s->ctx) { + aio_context_release(s->ctx); + } +} + void virtio_scsi_common_realize(DeviceState *dev, Error **errp, VirtIOHandleOutput ctrl, VirtIOHandleOutput evt, VirtIOHandleOutput cmd); |