diff options
| author | Gonglei | 2016-12-22 04:12:39 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin | 2017-01-10 06:02:52 +0100 |
| commit | 6138dbda5a4bfa6c724fd04b9225181d3a3c85a7 (patch) | |
| tree | a730b7934ba7b92adbddea16d8dcb7969446b144 /include | |
| parent | cryptodev: introduce a new is_used property (diff) | |
| download | qemu-6138dbda5a4bfa6c724fd04b9225181d3a3c85a7.tar.gz qemu-6138dbda5a4bfa6c724fd04b9225181d3a3c85a7.tar.xz qemu-6138dbda5a4bfa6c724fd04b9225181d3a3c85a7.zip | |
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')
| -rw-r--r-- | include/sysemu/cryptodev.h | 19 |
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 */ |
