aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu/cryptodev.h
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2016-12-22 11:12:39 +0800
committerMichael S. Tsirkin <mst@redhat.com>2017-01-10 07:02:52 +0200
commit6138dbda5a4bfa6c724fd04b9225181d3a3c85a7 (patch)
treea730b7934ba7b92adbddea16d8dcb7969446b144 /include/sysemu/cryptodev.h
parent46fd17054548b15b3b8a5991492f5f0dc37957d4 (diff)
cryptodev: wrap the ready flag
The ready flag should be set by the children of cryptodev backend interface. Warp the setter/getter functions for it. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/sysemu/cryptodev.h')
-rw-r--r--include/sysemu/cryptodev.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/sysemu/cryptodev.h b/include/sysemu/cryptodev.h
index 461389df85..a9d0d1ee25 100644
--- a/include/sysemu/cryptodev.h
+++ b/include/sysemu/cryptodev.h
@@ -317,5 +317,24 @@ void cryptodev_backend_set_used(CryptoDevBackend *backend, bool used);
*/
bool cryptodev_backend_is_used(CryptoDevBackend *backend);
+/**
+ * cryptodev_backend_set_ready:
+ * @backend: the cryptodev backend object
+ * @ready: ture or false
+ *
+ * Set the cryptodev backend is ready or not, which is called
+ * by the children of the cryptodev banckend interface.
+ */
+void cryptodev_backend_set_ready(CryptoDevBackend *backend, bool ready);
+
+/**
+ * cryptodev_backend_is_ready:
+ * @backend: the cryptodev backend object
+ *
+ * Return the status that the cryptodev backend is ready or not
+ *
+ * Returns: true on ready, or false on not ready
+ */
+bool cryptodev_backend_is_ready(CryptoDevBackend *backend);
#endif /* CRYPTODEV_H */