Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Sound Manager & MIDI callbacks, interrupts and threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sound Manager & MIDI callbacks, interrupts and threads



Sounds like the mutex approach I'm now using may well be ok so I'll
stick with it - got to get on - but the FIFO queue stuff seems also very
viable, better in fact.

>Have a look in CoreServices/DriverSynchronization.h -- there are
>functions in there that manipulate memory in truly atomic ways.

These are fascinating. I may get round to using them yet.

>If this is the case, you should take a look at the Darwin Streaming
>server, in particular, the section SubProjects/AtomicLib. There, you
>will find all the details for implementing an atomic queue.The source is
>available only if you are an ADC member. It's quite easy to use. The
>atomic operations are written for ppc and this can be adapted to other
>architectures. The plumbing is the same.

I will check this out.

>Subject: Re: Sound Manager & MIDI callbacks, interrupts and threads
>From: Kurt Bigler <email@hidden>
>To: <email@hidden>
>
>On Tuesday, February 19, 2002, at 03:04 , Andy Robinson wrote:
>>> It seems a great pity we can't just disable interrupts briefly, life
>>> would be so much simpler. An instruction to "disable interrupts for the
>>> next 20 instructions" would do the job without endangering the stability
>>> of the OS, it seems to me.
>
>on 2/19/02 9:44 AM, Doug Wyatt <email@hidden> wrote:
>> But you never really know how many instructions your critical region
>> is. It might be 12 instructions today, 24 instructions if you flip a
>> compiler setting.
>
>Does the idea of turning interrupts off depend on a single-cpu situation?
>In a multi-cpu environment does what Andy Robinson is wishing for translate
>to "turn off interrupts and stop all the other CPUs?"?

I must confess I hadn't considered the multi-cpu question.
But it's nice to know that overall, you don't seem to think the idea
completely mad.

Andy Robinson, Seventh String Software, www.seventhstring.demon.co.uk
_______________________________________________
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.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.