summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLadi Prosek <lprosek@redhat.com>2016-03-03 09:37:16 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:49:12 -0600
commitb0a27b401d48e2e09cc95bc4ac9fdbdb32472ceb (patch)
treeab6d623c71df46c0517a3d335902a9edfd5b33db /include
parent17a173cd3e1bee8ce7db1c78123784a7023ba8b6 (diff)
downloadhqemu-b0a27b401d48e2e09cc95bc4ac9fdbdb32472ceb.zip
hqemu-b0a27b401d48e2e09cc95bc4ac9fdbdb32472ceb.tar.gz
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')
-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 87b3ebe..c744d82 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;
};
/**
OpenPOWER on IntegriCloud