[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v2] lib/ukswrand: Make uk_swrand structure public



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 19.07.2018 13:42, Roxana Nicolescu wrote:
Move definition of uk_swrand struct from mwc.c to swrand.h
Struct uk_swrand definition depends on the configured algorithm.

Signed-off-by: Roxana Nicolescu <nicolescu.roxana1996@xxxxxxxxx>
---
  lib/ukswrand/include/uk/swrand.h | 10 +++++++++-
  lib/ukswrand/mwc.c               |  6 ------
  2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/lib/ukswrand/include/uk/swrand.h b/lib/ukswrand/include/uk/swrand.h
index e2e43f9..9a93e87 100644
--- a/lib/ukswrand/include/uk/swrand.h
+++ b/lib/ukswrand/include/uk/swrand.h
@@ -37,12 +37,20 @@
#include <uk/arch/types.h>
  #include <uk/plat/lcpu.h>
+#include <uk/config.h>
#ifdef __cplusplus
  extern "C" {
  #endif
-struct uk_swrand;
+struct uk_swrand {
+#ifdef CONFIG_LIBUKSWRAND_MWC
+        __u32 Q[4096];
+        __u32 c;
+        __u32 i;
+#endif
+};
+
  extern struct uk_swrand uk_swrand_def;
void uk_swrand_init_r(struct uk_swrand *r, __u32 seed);
diff --git a/lib/ukswrand/mwc.c b/lib/ukswrand/mwc.c
index 60a5bf1..e3f4669 100644
--- a/lib/ukswrand/mwc.c
+++ b/lib/ukswrand/mwc.c
@@ -42,12 +42,6 @@
  #define PHI 0x9e3779b9
  #define UK_SWRAND_CTOR_PRIO    (200U)
-struct uk_swrand {
-       __u32 Q[4096];
-       __u32 c;
-       __u32 i;
-};
-
  struct uk_swrand uk_swrand_def;
/*


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.