[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pthread_cond_timedwait() returns ESRCH
On Thu, Mar 17, 2011 at 05:02:46PM +0000, Sad Clouds wrote:
> Hi, I'm trying to figure out why pthread_cond_timedwait() sometimes
> returns error code 3 (ESRCH). Anyone knows under what circumstances
> this can happen?
I think that could only come from a call to _lwp_park or _lwp_unpark or
_lwp_unpark_all. Those syscalls should be changed to wake up as many
threads as possible, and then propogate back any error code. libpthread
should be changed to judiciously ignore ESRCH errors returned from them.
There are, I think, cases where we can try to unpark a thread that has
already exited which would lead to ESRCH. Can you please file a PR?
Main Index |
Thread Index |