summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/sys/random.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/sys/random.h')
-rw-r--r--freebsd/sys/sys/random.h42
1 files changed, 17 insertions, 25 deletions
diff --git a/freebsd/sys/sys/random.h b/freebsd/sys/sys/random.h
index c717a686..f32d3f66 100644
--- a/freebsd/sys/sys/random.h
+++ b/freebsd/sys/sys/random.h
@@ -35,12 +35,6 @@
#ifdef _KERNEL
-#if !defined(KLD_MODULE)
-#if defined(RANDOM_LOADABLE) && defined(RANDOM_YARROW)
-#error "Cannot define both RANDOM_LOADABLE and RANDOM_YARROW"
-#endif
-#endif
-
struct uio;
#if defined(DEV_RANDOM)
@@ -105,6 +99,7 @@ enum random_entropy_source {
RANDOM_PURE_VIRTIO,
RANDOM_PURE_BROADCOM,
RANDOM_PURE_CCP,
+ RANDOM_PURE_DARN,
ENTROPYSOURCE
};
@@ -117,57 +112,54 @@ enum random_entropy_source {
#if defined(DEV_RANDOM)
extern u_int hc_source_mask;
-void random_harvest_queue_(const void *, u_int, u_int, enum random_entropy_source);
-void random_harvest_fast_(const void *, u_int, u_int);
-void random_harvest_direct_(const void *, u_int, u_int, enum random_entropy_source);
+void random_harvest_queue_(const void *, u_int, enum random_entropy_source);
+void random_harvest_fast_(const void *, u_int);
+void random_harvest_direct_(const void *, u_int, enum random_entropy_source);
static __inline void
-random_harvest_queue(const void *entropy, u_int size, u_int bits,
- enum random_entropy_source origin)
+random_harvest_queue(const void *entropy, u_int size, enum random_entropy_source origin)
{
if (hc_source_mask & (1 << origin))
- random_harvest_queue_(entropy, size, bits, origin);
+ random_harvest_queue_(entropy, size, origin);
}
static __inline void
-random_harvest_fast(const void *entropy, u_int size, u_int bits,
- enum random_entropy_source origin)
+random_harvest_fast(const void *entropy, u_int size, enum random_entropy_source origin)
{
if (hc_source_mask & (1 << origin))
- random_harvest_fast_(entropy, size, bits);
+ random_harvest_fast_(entropy, size);
}
static __inline void
-random_harvest_direct(const void *entropy, u_int size, u_int bits,
- enum random_entropy_source origin)
+random_harvest_direct(const void *entropy, u_int size, enum random_entropy_source origin)
{
if (hc_source_mask & (1 << origin))
- random_harvest_direct_(entropy, size, bits, origin);
+ random_harvest_direct_(entropy, size, origin);
}
void random_harvest_register_source(enum random_entropy_source);
void random_harvest_deregister_source(enum random_entropy_source);
#else
-#define random_harvest_queue(a, b, c, d) do {} while (0)
-#define random_harvest_fast(a, b, c, d) do {} while (0)
-#define random_harvest_direct(a, b, c, d) do {} while (0)
+#define random_harvest_queue(a, b, c) do {} while (0)
+#define random_harvest_fast(a, b, c) do {} while (0)
+#define random_harvest_direct(a, b, c) do {} while (0)
#define random_harvest_register_source(a) do {} while (0)
#define random_harvest_deregister_source(a) do {} while (0)
#endif
#if defined(RANDOM_ENABLE_UMA)
-#define random_harvest_fast_uma(a, b, c, d) random_harvest_fast(a, b, c, d)
+#define random_harvest_fast_uma(a, b, c) random_harvest_fast(a, b, c)
#else /* !defined(RANDOM_ENABLE_UMA) */
-#define random_harvest_fast_uma(a, b, c, d) do {} while (0)
+#define random_harvest_fast_uma(a, b, c) do {} while (0)
#endif /* defined(RANDOM_ENABLE_UMA) */
#if defined(RANDOM_ENABLE_ETHER)
-#define random_harvest_queue_ether(a, b, c) random_harvest_queue(a, b, c, RANDOM_NET_ETHER)
+#define random_harvest_queue_ether(a, b) random_harvest_queue(a, b, RANDOM_NET_ETHER)
#else /* !defined(RANDOM_ENABLE_ETHER) */
-#define random_harvest_queue_ether(a, b, c) do {} while (0)
+#define random_harvest_queue_ether(a, b) do {} while (0)
#endif /* defined(RANDOM_ENABLE_ETHER) */