Re: threading questions
Re: threading questions
- Subject: Re: threading questions
- From: Matthew D Hancher <email@hidden>
- Date: Sat, 15 Nov 2003 18:08:58 -0500
Doug Wyatt wrote:
>
I'd just add that on a dual CPU, the probability of multiple callbacks
>
into your code running simultaneously is much greater than on a
>
single-processor machine...
Yeah, this is the exactly the problem that has been keeping me up at
night these days. For instance, how on earth am I supposed to proceed
if an IOProc is called on one processor while I am processing a
notification that that device has been reconfigured on the other
processor?
I guess that example is still an issue on single-processor systems,
since the IOProc might reasonably interrupt the notification thread.
I'd be fine with locking the device in these rare circumstances, but I
can't even be sure that I'll get the chance to lock it before I'm
interrupted. In this case the device is expecting me to behave as
though I've received the notification, but as far as I'm concerned I
haven't.
What's the usual framework for safely handling notifications about
changes to a device while the device is in active use?
Thanks,
Matt
>
On Nov 10, 2003, at 12:33, Jeff Moore wrote:
>
> Unless one were to configure kAudioHardwarePropertyRunLoop in a very
>
> odd way, it isn't likely that another thread would interrupt your
>
> IOProc to deliver notifications, but if you were to call back into the
>
> HAL to change some state of the device from inside your IOProc, there
>
> is every likelihood that your listener procs will get called while
>
> your IOProc is executing.
>
>
>
>> For that matter, can one IOProc interrupt another IOProc?
>
>
>
> For most drivers, there is only one thread per device per process. So,
>
> multiple IOProcs on the same device will not interrupt each other. But
>
> if each IOProc is attached to a different device, then it is possible
>
> for the threads to interrupt each other if your IOProc takes long
>
> enough to execute.
>
>
--__--__--
>
>
Message: 5
>
Date: Sat, 15 Nov 2003 05:43:16 +0100
>
Subject: Re: Logic Audio and MAXFILEs
>
From: Cyril Blanc <email@hidden>
>
To: Markus Fritze <email@hidden>
>
Cc: liste Cure audio <email@hidden>, Marc Poirier
>
<email@hidden>
>
>
On 14/11/03 19:41, "Markus Fritze" <email@hidden> wrote:
>
>
>> Markus, if you have a minute can you answer to the following questions
>
>> :
>
>
>
> Ehm, this is the Core-Audio API forum. It is for developers and NOT a
>
> support forum for Logic. Use <email@hidden>, LUG or other forums
>
> for this. Thank you.
>
>
>
>
>
> Markus
>
Hello Markus,
>
Thanks for your answer.
>
I will try support.
>
>
>
Best regards
>
>
Cyril Blanc
>
France
>
>
Please sign the petition 3Apple to support APPLE LaserWriter 300 in MAC OS
>
X2
>
http://www.PetitionOnline.com/Ap1c1/petition.html
>
>
If you want to be sure I read your answer leave my name in it !
>
Spam mails are directly going to trash
>
>
>
--__--__--
>
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
>
>
>
End of coreaudio-api Digest
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.