From bcf527a98e295548629620a7cb06ada951db7822 Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 17 Sep 2004 03:34:32 +0000 Subject: Continue switching library over to pthreads when possible. Tprimes works on Linux 2.6. You can only have 128 procs though. --- src/libthread/threadimpl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libthread/threadimpl.h') diff --git a/src/libthread/threadimpl.h b/src/libthread/threadimpl.h index 851186e3..d6a23905 100644 --- a/src/libthread/threadimpl.h +++ b/src/libthread/threadimpl.h @@ -95,6 +95,8 @@ struct Thread Chanstate chan; /* which channel operation is current */ Alt *alt; /* pointer to current alt structure (debugging) */ ulong userpc; + Channel *c; + pthread_cond_t cond; void* udata[NPRIV]; /* User per-thread data pointer */ int lastfd; @@ -136,6 +138,8 @@ struct Proc uint nextID; /* ID of most recently created thread */ Proc *next; /* linked list of Procs */ + _Procrend rend; /* sleep here for more ready threads */ + void *arg; /* passed between shared and unshared stk */ char str[ERRMAX]; /* used by threadexits to avoid malloc */ char errbuf[ERRMAX]; /* errstr */ -- cgit v1.2.3