From 7966faa931bfa9cf4ca53dd2d5b6e1eb0f174411 Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 23 Sep 2004 03:01:36 +0000 Subject: Continue fighting pthreads. Clean up thread library a bit too. --- src/libthread/rendez.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 src/libthread/rendez.c (limited to 'src/libthread/rendez.c') diff --git a/src/libthread/rendez.c b/src/libthread/rendez.c deleted file mode 100644 index 4451fa4d..00000000 --- a/src/libthread/rendez.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "threadimpl.h" - -int _threadhighnrendez; -int _threadnrendez; - -void -_threadsleep(_Procrend *r) -{ - Thread *t; - - t = _threadgetproc()->thread; - r->arg = t; - t->nextstate = Rendezvous; - t->inrendez = 1; - unlock(r->l); - _sched(); - t->inrendez = 0; - lock(r->l); -} - -void -_threadwakeup(_Procrend *r) -{ - Thread *t; - - t = r->arg; - while(t->state == Running) - sleep(0); - lock(&t->proc->lock); - if(t->state == Dead){ - unlock(&t->proc->lock); - return; - } - assert(t->state == Rendezvous && t->inrendez); - t->state = Ready; - _threadready(t); - unlock(&t->proc->lock); -} -- cgit v1.2.3