vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit b47c387cf738c3cd3b4b237730d40dcfcb696587
parent 55d7e9fd9831d36bf3f2737ef09ade397e1321b8
Author: Russ Cox <rsc@swtch.com>
Date:   Sat, 28 Jun 2008 12:40:31 -0400

9vx: fewer spurious wakeup prints in scheduler

Diffstat:
src/9vx/sched.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/9vx/sched.c b/src/9vx/sched.c @@ -79,10 +79,14 @@ static Psleep idling; void idlehands(void) { + int nbad; + plock(&idling); + nbad = 0; while(!idlewakeup){ psleep(&idling); - iprint("idlehands spurious wakeup\n"); + if(!idlewakeup && ++nbad%1000 == 0) + iprint("idlehands spurious wakeup\n"); } idlewakeup = 0; punlock(&idling); @@ -137,7 +141,6 @@ ready(Proc *p) kprocq.n++; if(kprocq.n > nrunproc) newmach(); -iprint("ready p\n"); pwakeup(&run); unlock(&kprocq.lk); punlock(&run);