diff options
author | jhb <jhb@FreeBSD.org> | 2000-09-11 04:09:08 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-09-11 04:09:08 +0000 |
commit | 0ccc0648b7e9af79c0e00df23f70251b52f1784b (patch) | |
tree | 08af23dabaf0999c1876ea99ead69e7c1ca734c7 /sys/dev/random/yarrow.c | |
parent | bd6b65a7573b93de5b2792b4d244a3e6db9a1ee3 (diff) | |
download | FreeBSD-src-0ccc0648b7e9af79c0e00df23f70251b52f1784b.zip FreeBSD-src-0ccc0648b7e9af79c0e00df23f70251b52f1784b.tar.gz |
- Use RFHIGHPID when creating the kthread to get a more sensible pid.
- Don't fake walking a tailq. Instead, use a while loop that pulls items
off the head of the queue while the queue is not empty.
Diffstat (limited to 'sys/dev/random/yarrow.c')
-rw-r--r-- | sys/dev/random/yarrow.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c index d882480..46c1a2c 100644 --- a/sys/dev/random/yarrow.c +++ b/sys/dev/random/yarrow.c @@ -43,6 +43,7 @@ #include <sys/random.h> #include <sys/time.h> #include <sys/types.h> +#include <sys/unistd.h> #include <machine/mutex.h> #include <crypto/blowfish/blowfish.h> @@ -130,7 +131,7 @@ random_kthread(void *status) #ifdef DEBUG1 queuecount = 0; #endif - TAILQ_FOREACH(event, &harvestqueue, harvest) { + while (!TAILQ_EMPTY(&harvestqueue)) { #ifdef DEBUG1 queuecount++; #endif @@ -227,7 +228,7 @@ random_init(void) /* Start the hash/reseed thread */ error = kthread_create(random_kthread, &random_kthread_status, - &random_kthread_proc, 0, "random"); + &random_kthread_proc, RFHIGHPID, "random"); if (error != 0) return error; |