bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hurd_condition_wait


From: Vicente Hernando Ara
Subject: Re: Hurd_condition_wait
Date: 17 Nov 2002 13:33:22 +0100

El sáb, 16-11-2002 a las 22:01, Neal H. Walfield escribió:

> > /* Just like pthread_condition_wait, but cancellable.  Returns true if
> > cancelled.  */
> > int
> > hurd_pthread_cond_wait (pthread_cond_t c, pthread_mutex_t m)
> 
> I see no reason to rename this function.
As long as cthread and pthread are not compatible, nor me. ;)

> 
> Also, this should be:
> 
>   hurd_cond_wait (pthread_cond_t *c, pthread_mutex_t *m)
ops! I wrote that quickly...

> > c) A different implementation using __pthread_enqueue function.
> 
> This should be done anyways.
> 
Is there a replacement for CPROC_SWITCHING and CPROC_RUNNING in
cproc_t->state, to know if a thread has been waken up?

__pthread.state has the following states...
 
 /* Thread state.  */
enum pthread_state
{
  PTHREAD_JOINABLE = 0,
  PTHREAD_DETACHED,
  PTHREAD_EXITED,
  PTHREAD_TERMINATED
};

Can a thread be waken up if it hasnt been blocked?

--

Thanks,
Vicente.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]