From ef2dff1dbae69e300b655586233c0b8d2c36676a Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Mon, 30 Aug 1993 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1993-08-30 --- port/proc.c | 3 --- port/taslock.c | 15 ++++----------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/port/proc.c b/port/proc.c index 9be89051070027560554be37a1e7f89b1a728fa2..233bb269eb51524f959ab069686f3257792c03fa 100644 --- a/port/proc.c +++ b/port/proc.c @@ -157,9 +157,6 @@ loop: /* p->mach==0 only when process state is saved */ if(p == 0 || p->mach){ unlock(&runhiq); - /* keep off the bus (tuned for everest) */ - if(conf.nmach > 1) - delay(7); goto loop; } if(p->rnext == 0) diff --git a/port/taslock.c b/port/taslock.c index ef4364cd14beee384ef75caa5721b2f7a7c4a941..a410aa65b45f66877487790c7a2c3c78dd252728 100644 --- a/port/taslock.c +++ b/port/taslock.c @@ -8,19 +8,12 @@ void lock(Lock *l) { - int i; - ulong pc; - - pc = getcallerpc(((uchar*)&l) - sizeof(l)); - - for(i = 0; i < 20000000; i++){ - if (tas(&l->key) == 0){ - l->pc = pc; + for(;;){ + while(l->key) + ; + if(tas(&l->key) == 0) return; - } } - panic("lock loop 0x%lux key 0x%lux pc 0x%lux held by pc 0x%lux\n", - i, l->key, pc, l->pc); } int