Re: pthreads
[email protected] (Neal H. Walfield)
| Newsgroups | gmane.os.hurd.devel.readers |
|---|---|
| Message-ID | <[email protected]> |
> The critical piece of the thread implementation (any one) is cancellation.
> This will work differently in pthreads then it works right now in
> cthreads.
Well sure it will work differently, but it is essentially, a
substitution. Right now we use, for instance, hurd_condition_wait:
if (hurd_condition_wait (&cond, &mutex))
{
mutex_unlock (&mutex);
return EINTR;
}
in pthreads we will do:
pthread_cleanup_push (pthread_mutex_unlock, (void *) &mutex);
pthread_condition_wait (&cond, &mutex);
pthread_cleanup_pop (1);
Or are you trying to say something else that I am just missing?
Thanks.