diff options
author | Ladi Prosek <lprosek@redhat.com> | 2016-03-03 09:37:17 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:49:12 -0600 |
commit | 855f3d3b99a9267239732fa637699e58d64a2261 (patch) | |
tree | 12b35f205acdcdae7a672904d3622054871b5986 /include | |
parent | b0a27b401d48e2e09cc95bc4ac9fdbdb32472ceb (diff) | |
download | hqemu-855f3d3b99a9267239732fa637699e58d64a2261.zip hqemu-855f3d3b99a9267239732fa637699e58d64a2261.tar.gz |
rng: move request queue cleanup from RngEgd to RngBackend
RngBackend is now in charge of cleaning up the linked list on
instance finalization. It also exposes a function to finalize
individual RngRequest instances, called by its child classes.
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Message-Id: <1456994238-9585-4-git-send-email-lprosek@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sysemu/rng.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h index c744d82..08a2eda 100644 --- a/include/sysemu/rng.h +++ b/include/sysemu/rng.h @@ -60,6 +60,7 @@ struct RngBackend GSList *requests; }; + /** * rng_backend_request_entropy: * @s: the backend to request entropy from @@ -78,4 +79,15 @@ struct RngBackend void rng_backend_request_entropy(RngBackend *s, size_t size, EntropyReceiveFunc *receive_entropy, void *opaque); + +/** + * rng_backend_free_request: + * @s: the backend that created the request + * @req: the request to finalize + * + * Used by child rng backend classes to finalize requests once they've been + * processed. The request is removed from the list of active requests and + * deleted. + */ +void rng_backend_finalize_request(RngBackend *s, RngRequest *req); #endif |