From c0b21416acb4b2c67ccb5a987b2ac933d5e32f68 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Mon, 8 Oct 2007 08:27:19 +0000 Subject: 20071008-0926 --- CHANGES | 2 ++ emu/port/random.c | 2 +- include/version.h | 2 +- os/port/random.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 517d423a..d1af15c9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +20071008 + nemo's change to emu/port/random.c; really the file needs a little rewriting for clarity (too many overlapping states) 20071002 ensure fmtdef.h included by some lib9 functions so that va_copy is defined on older systems that lack that needless notion <{} and >{} added to sh(1) diff --git a/emu/port/random.c b/emu/port/random.c index 05ae2b9a..90d20c6a 100644 --- a/emu/port/random.c +++ b/emu/port/random.c @@ -52,7 +52,7 @@ genrandom(void *v) for(;;) if(++rb.randomcount > 65535) break; - if(!rbnotfull(0)) + if(rb.filled || !rbnotfull(0)) Sleep(&rb.producer, rbnotfull, 0); } } diff --git a/include/version.h b/include/version.h index b69de01c..6f7dd145 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -#define VERSION "Fourth Edition (20071003)" +#define VERSION "Fourth Edition (20071008)" 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); } } -- cgit v1.2.3