Re: 10.6.3 Open File Dialog preview stalling AUHAL (AudioQueue <->AUHal deadlock ?)
Re: 10.6.3 Open File Dialog preview stalling AUHAL (AudioQueue <->AUHal deadlock ?)
- Subject: Re: 10.6.3 Open File Dialog preview stalling AUHAL (AudioQueue <->AUHal deadlock ?)
- From: Jeff Moore <email@hidden>
- Date: Mon, 26 Apr 2010 22:48:18 -0700
You need to implement some kind of synchronization between your code on the IO thread and the code running on other threads if they access the same state. There are a variety of ways to do this including using lockless FIFOs. Another popular technique is to use pthread_mutex_try which let's you acquire a mutex if it is free but won't block if it isn't.
On Apr 26, 2010, at 10:41 PM, Ross Bencina wrote:
>> This is an application bug.
>> The spin trace shows that the IOProc is calling AudioDeviceGetProperty().
>
> Yes that's correct.
>
>> This call, like every other HAL API call, blocks.
>> So it cannot be made from your IOProc without things like this happening.
>
> Thanks for clarifying Jeff.
>
>> To fix this, your app needs to be caching what it needs
>> from the HAL prior to the IOProc getting called.
>
> Is there any guarantee of mutual exclusion beteen HAL notification callbacks and the IOProc? or do I have to implement some kind of lock free buffering to get make this information available to the callback without blocking.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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