• 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: render callback + pthread_cond_signal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: render callback + pthread_cond_signal


  • Subject: Re: render callback + pthread_cond_signal
  • From: Paul Davis <email@hidden>
  • Date: Thu, 28 Oct 2010 22:34:35 -0400

On Thu, Oct 28, 2010 at 9:46 PM,  <email@hidden> wrote:
> Scott Burgess wrote:
>> Is calling pthread_cond_signal() from an AU render callback cool?
>
> Yes and no ... you have to do it without acquiring the condition
> variable mutex, which can lead to race conditions.

Not quite true. You have to do it without a blocking attempt to
acquire the mutex. If you use pthread_mutex_trylock() and check the
result, there's no risk. However, you then need a fallback strategy
for the case where you don't get the lock.

> The best method AFAIK is to use mach semaphores.

We use Mach semaphores for IPC within JACK. There's been some question
recently whether the POSIX semaphore implementation in OS X is good
enough for this too. On linux, the implementation has changed quite a
lot over the last 10 years and its not the faster IPC notification
mechanism on that platform. My impression is that Mach semaphores are
still significantly better than POSIX semaphores on OS X ....

--p
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >iOS 4.1/4.2 for iPad - ETA and Accelerate support? (From: tahome izwah <email@hidden>)
 >Re: iOS 4.1/4.2 for iPad - ETA and Accelerate support? (From: tahome izwah <email@hidden>)
 >Re: iOS 4.1/4.2 for iPad - ETA and Accelerate support? (From: Kyle Sluder <email@hidden>)
 >Re: iOS 4.1/4.2 for iPad - ETA and Accelerate support? (From: tahome izwah <email@hidden>)
 >Re: iOS 4.1/4.2 for iPad - ETA and Accelerate support? (From: Wil Macaulay <email@hidden>)
 >render callback + pthread_cond_signal (From: Scott Burgess <email@hidden>)
 >RE: render callback + pthread_cond_signal (From: <email@hidden>)

  • Prev by Date: RE: render callback + pthread_cond_signal
  • Next by Date: a bit OT : internal speakers as disappears form the audio out menu
  • Previous by thread: RE: render callback + pthread_cond_signal
  • Next by thread: Bug in AUBase::ScheduleParameter?
  • Index(es):
    • Date
    • Thread