summaryrefslogtreecommitdiff
path: root/os/port/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/port/random.c')
-rw-r--r--os/port/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/port/random.c b/os/port/random.c
index 720541c0..62dac4fe 100644
--- a/os/port/random.c
+++ b/os/port/random.c
@@ -51,7 +51,7 @@ genrandom(void*)
break;
if(anyhigher())
sched();
- if(!rbnotfull(0))
+ if(rb.filled || !rbnotfull(0))
sleep(&rb.producer, rbnotfull, 0);
}
}