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: Paul Barton-Davis (pbd_AT_Op.Net)
Date: to loka   14 1999 - 12:17:53 EDT


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.


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