diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/rnd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index d8d62fa92b7..9bb08acc845 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.94 2008/10/10 20:13:11 deraadt Exp $ */ +/* $OpenBSD: rnd.c,v 1.95 2008/10/15 03:30:57 djm Exp $ */ /* * rnd.c -- A strong random number generator @@ -1057,8 +1057,11 @@ randomread(dev_t dev, struct uio *uio, int ioflag) default: ret = ENXIO; } - if (n != 0 && ret == 0) + if (n != 0 && ret == 0) { ret = uiomove((caddr_t)buf, n, uio); + if (!ret && uio->uio_resid > 0) + yield(); + } } free(buf, M_TEMP); |