Re: [linux-audio-dev] atomic xchg

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] atomic xchg
From: Benno Senoner (sbenno_AT_gardena.net)
Date: to loka   14 1999 - 17:20:13 EDT


On Thu, 14 Oct 1999, Paul Barton-Davis wrote:
> In message <3870BF54.E9C7E4C9_AT_response.cx>you write:
> >Why do u wish to do this -- is it a concurrency issue ??
>
> yep. when an engine thread is writing to a set of output buffers, and
> another thread is reading from a different set of output buffers, i'd
> like to able to atomically swap the pointers to the buffer sets
> without a lock whenever the reader thread is all done. something like
> that.
>
> that way, the engine thread can keep doing its stuff (as long its uses
> the pointer all the time and does not cache it, and declares it
> volatile) without having to constantly lock and unlock every time it
> wants to stuff data into the output buffer.
>
> david has also pointed a potential (though not likely to be used) use
> for it with timestamping.

Paul make sure that we have a fallback solution (compile time) for CPU
architectures which do not provide these specialized asm instructions,
since it would be nice to run our audio engine on any powerful Linux
architecture ( Alpha, G4 PPC etc).

Benno.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:27:59 EST