summaryrefslogtreecommitdiffstats
path: root/src/libthread/rendez.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-09-23 03:01:36 +0000
committerrsc <devnull@localhost>2004-09-23 03:01:36 +0000
commit7966faa931bfa9cf4ca53dd2d5b6e1eb0f174411 (patch)
treecbf2c9099f0d78c2c26aeea687803d43049db521 /src/libthread/rendez.c
parentc6687d4591964cb13df87f55ec4770e778a4a55c (diff)
downloadplan9port-7966faa931bfa9cf4ca53dd2d5b6e1eb0f174411.tar.gz
plan9port-7966faa931bfa9cf4ca53dd2d5b6e1eb0f174411.zip
Continue fighting pthreads.
Clean up thread library a bit too.
Diffstat (limited to 'src/libthread/rendez.c')
-rw-r--r--src/libthread/rendez.c38
1 files changed, 0 insertions, 38 deletions
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);
-}