Continue switching library over to pthreads when possible.
Tprimes works on Linux 2.6. You can only have 128 procs though.
This commit is contained in:
parent
06bb4ed20d
commit
bcf527a98e
15 changed files with 146 additions and 561 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue