Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/random/randomdev.c
Show First 20 Lines • Show All 367 Lines • ▼ Show 20 Lines | |||||
/* This will be called by the entropy processor when it seeds itself and becomes secure */ | /* This will be called by the entropy processor when it seeds itself and becomes secure */ | ||||
void | void | ||||
randomdev_unblock(void) | randomdev_unblock(void) | ||||
{ | { | ||||
selwakeuppri(&rsel, PUSER); | selwakeuppri(&rsel, PUSER); | ||||
wakeup(p_random_alg_context); | wakeup(p_random_alg_context); | ||||
printf("random: unblocking device.\n"); | printf("random: unblocking device.\n"); | ||||
#ifndef RANDOM_FENESTRASX | |||||
/* Do random(9) a favour while we are about it. */ | /* Do random(9) a favour while we are about it. */ | ||||
(void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE, ARC4_ENTR_HAVE); | (void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE, ARC4_ENTR_HAVE); | ||||
#endif | |||||
} | } | ||||
/* ARGSUSED */ | /* ARGSUSED */ | ||||
static int | static int | ||||
randomdev_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr __unused, | randomdev_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr __unused, | ||||
int flags __unused, struct thread *td __unused) | int flags __unused, struct thread *td __unused) | ||||
{ | { | ||||
int error = 0; | int error = 0; | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |