Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/random/other_algorithm.h
Show All 25 Lines | |||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
/*- | /*- | ||||
* This is a skeleton for folks who wish to build a loadable module | * This is a skeleton for folks who wish to build a loadable module | ||||
* containing an alternative entropy-processing algorithm for random(4). | * containing an alternative entropy-processing algorithm for random(4). | ||||
* | * | ||||
* The functions below should be completed with the appropriate code, | * The functions below should be completed with the appropriate code, | ||||
* and the nearby yarrow.c and fortuna.c may be consulted for examples | * and the nearby fortuna.c may be consulted for examples of working code. | ||||
* of working code. | |||||
* | * | ||||
* The author is willing to provide reasonable help to those wishing to | * The author is willing to provide reasonable help to those wishing to | ||||
* write such a module for themselves. Please use the markm@ FreeBSD | * write such a module for themselves. Please use the markm@ FreeBSD | ||||
* email address, and ensure that you are developing this on a suitably | * email address, and ensure that you are developing this on a suitably | ||||
* supported branch (This is currently 11-CURRENT, and will be no | * supported branch (This is currently 12-CURRENT, and may be no | ||||
* older than 11-STABLE in the future). | * older than 12-STABLE in the future). | ||||
*/ | */ | ||||
#ifndef SYS_DEV_RANDOM_OTHER_H_INCLUDED | #ifndef SYS_DEV_RANDOM_OTHER_H_INCLUDED | ||||
#define SYS_DEV_RANDOM_OTHER_H_INCLUDED | #define SYS_DEV_RANDOM_OTHER_H_INCLUDED | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
typedef struct mtx mtx_t; | typedef struct mtx mtx_t; | ||||
#define RANDOM_RESEED_INIT_LOCK(x) mtx_init(&other_mtx, "reseed mutex", NULL, MTX_DEF) | #define RANDOM_RESEED_INIT_LOCK(x) mtx_init(&other_mtx, "reseed mutex", NULL, MTX_DEF) | ||||
Show All 13 Lines |