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
|
|
@ -375,23 +375,3 @@ rwakeupall(Rendez *r)
|
|||
;
|
||||
return i;
|
||||
}
|
||||
|
||||
void
|
||||
_procsleep(_Procrend *rend)
|
||||
{
|
||||
//print("sleep %p %d\n", rend, getpid());
|
||||
pthread_cond_init(&rend->cond, 0);
|
||||
rend->asleep = 1;
|
||||
while(rend->asleep)
|
||||
pthread_cond_wait(&rend->cond, &rend->l->mutex);
|
||||
pthread_cond_destroy(&rend->cond);
|
||||
}
|
||||
|
||||
void
|
||||
_procwakeup(_Procrend *rend)
|
||||
{
|
||||
//print("wakeup %p\n", rend);
|
||||
rend->asleep = 0;
|
||||
pthread_cond_signal(&rend->cond);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue