• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: pthread_cond_timedwait() bug in Tiger?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: ICMP Router Discovery
  • Next by Date: Re: ICMP Router Discovery
  • Previous by thread: Re: ICMP Router Discovery
  • Next by thread: Building shared libraries
  • Index(es):
    • Date
    • Thread