diff options
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | emu/port/random.c | 2 | ||||
| -rw-r--r-- | include/version.h | 2 | ||||
| -rw-r--r-- | os/port/random.c | 2 |
4 files changed, 5 insertions, 3 deletions
@@ -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); } } |
