Re: pthread_cond_timedwait() bug in Tiger?
Re: pthread_cond_timedwait() bug in Tiger?
- Subject: Re: pthread_cond_timedwait() bug in Tiger?
- From: Matt Watson <email@hidden>
- Date: Tue, 28 Jun 2005 17:28:25 -0700
Could it be that there is a bug in pthread_cond_timedwait() that
causes it to block forever if the absolute time value passed to it
lies in the past?
Hi, sorry for taking so long to follow up with this. I've been a
little busy.
For posterity:
Yes, there appears to be a bug in this routine in Tiger when either
_XOPEN_SOURCE, _POSIX_C_SOURCE or _APPLE_C_SOURCE is defined at
compile time, and you pass in an already elapsed timeout at runtime.
As a workaround, you can use pthread_cond_timedwait_relative_np() and
pass in a relative timeout, rather than computing the absolute timeout.
matt.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden