aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu/rng.h
diff options
context:
space:
mode:
authorLadi Prosek <lprosek@redhat.com>2016-03-03 09:37:16 +0100
committerAmit Shah <amit.shah@redhat.com>2016-03-03 17:42:26 +0530
commit74074e8a7c60592cf1cc6469dbc2550d24aeded3 (patch)
treecddb71c369a33acdfde8a2246e8bfe12a6ebcc60 /include/sysemu/rng.h
parent3c52ddcdc548e7fbe65112d8a7bdc9cd105b4750 (diff)
rng: move request queue from RngEgd to RngBackend
The 'requests' field now lives in the RngBackend parent class. There are no functional changes in this commit. Signed-off-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Message-Id: <1456994238-9585-3-git-send-email-lprosek@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'include/sysemu/rng.h')
-rw-r--r--include/sysemu/rng.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h
index 87b3ebec99..c744d82745 100644
--- a/include/sysemu/rng.h
+++ b/include/sysemu/rng.h
@@ -24,6 +24,7 @@
#define RNG_BACKEND_CLASS(klass) \
OBJECT_CLASS_CHECK(RngBackendClass, (klass), TYPE_RNG_BACKEND)
+typedef struct RngRequest RngRequest;
typedef struct RngBackendClass RngBackendClass;
typedef struct RngBackend RngBackend;
@@ -31,6 +32,15 @@ typedef void (EntropyReceiveFunc)(void *opaque,
const void *data,
size_t size);
+struct RngRequest
+{
+ EntropyReceiveFunc *receive_entropy;
+ uint8_t *data;
+ void *opaque;
+ size_t offset;
+ size_t size;
+};
+
struct RngBackendClass
{
ObjectClass parent_class;
@@ -47,6 +57,7 @@ struct RngBackend
/*< protected >*/
bool opened;
+ GSList *requests;
};
/**