summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/randomdev_soft.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/random/randomdev_soft.h')
-rw-r--r--sys/dev/random/randomdev_soft.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/random/randomdev_soft.h b/sys/dev/random/randomdev_soft.h
index c92a5a8..cbee779 100644
--- a/sys/dev/random/randomdev_soft.h
+++ b/sys/dev/random/randomdev_soft.h
@@ -26,6 +26,9 @@
* $FreeBSD$
*/
+#ifndef SYS_DEV_RANDOM_RANDOMDEV_SOFT_H_INCLUDED
+#define SYS_DEV_RANDOM_RANDOMDEV_SOFT_H_INCLUDED
+
/* This header contains only those definitions that are global
* and harvester-specific for the entropy processor
*/
@@ -41,26 +44,22 @@
#define HARVESTSIZE 16 /* max size of each harvested entropy unit */
-MALLOC_DECLARE(M_ENTROPY);
-
/* These are used to queue harvested packets of entropy. The entropy
* buffer size is pretty arbitrary.
*/
struct harvest {
uintmax_t somecounter; /* fast counter for clock jitter */
uint8_t entropy[HARVESTSIZE]; /* the harvested entropy */
- u_int size, bits, frac; /* stats about the entropy */
- enum esource source; /* stats about the entropy */
+ u_int size, bits; /* stats about the entropy */
+ enum esource source; /* origin of the entropy */
STAILQ_ENTRY(harvest) next; /* next item on the list */
};
void randomdev_init(void);
void randomdev_deinit(void);
-void randomdev_write(void *, int);
-
void randomdev_init_harvester(void (*)(u_int64_t, const void *, u_int,
- u_int, u_int, enum esource), int (*)(void *, int));
+ u_int, enum esource), int (*)(void *, int));
void randomdev_deinit_harvester(void);
void random_set_wakeup_exit(void *);
@@ -80,6 +79,8 @@ random_check_uint_##name(SYSCTL_HANDLER_ARGS) \
else if (*(u_int *)(oidp->oid_arg1) > (max)) \
*(u_int *)(oidp->oid_arg1) = (max); \
} \
- return sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, \
- req); \
+ return (sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, \
+ req)); \
}
+
+#endif
OpenPOWER on IntegriCloud