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

Re: [rtl] pthread_wait_np



eric (eek105@psu.edu) wrote:
> Ok, the reason for the confusion is that pthread_wait_np() does work to
> some degree even if the thread is not periodic. Yes i failed to RTFM.
> the thing that i don't like about the doco on pthread_suspend_np() is
> that it says the thread may not block right away, which causes me some
> FUD.

pthread_suspend_np(pthread_self())
always suspends the thread immediately.

"may not block right away" referes to the case when the argument to
pthread_suspend_np is not the current thread (something we don't encourage).
In this case, suspension takes place when the scheduler next runs.
 
> Another problem has occurred to me. Is it ok to pthread_kill(wakeup) a
> thread that isn't suspended?

Yes it is. If the thread is running, this signal has no effect.

Michael.