Re: [linux-audio-dev] Lock Free Ringbuffer in C ?

2003-04-05 Thread Ingo Oeser
On Fri, Apr 04, 2003 at 07:43:40AM -0500, Paul Davis wrote: there are several solutions, none of them particularly good. the best is to wait on a FIFO. these provide a fast, 99% non-blocking way to get 1 process to wake up another. the real solution needs to be provided by the kernel, and

Re: [linux-audio-dev] Lock Free Ringbuffer in C ?

2003-04-05 Thread David Olofson
On Friday 04 April 2003 17.15, [EMAIL PROTECTED] wrote: On Fri, Apr 04, 2003 at 12:47:28PM +0200, David Olofson wrote: On Thursday 03 April 2003 15.36, [EMAIL PROTECTED] wrote: i remember i have read a statement about a lock free ringbuffer implemented in C somewhere. Can anybody

Re: [linux-audio-dev] Lock Free Ringbuffer in C ?

2003-04-05 Thread David Olofson
On Friday 04 April 2003 17.15, [EMAIL PROTECTED] wrote: [...] res = sfifo_write(sf, buf, j); if(res != j) { DOH! Sorry, I'm in a hurry and misread your code. Well, we're talking about a basic lock free FIFO here, based on atomic reads and writes of two indices. Proper

Re: [linux-audio-dev] Lock Free Ringbuffer in C ?

2003-04-04 Thread David Olofson
On Thursday 03 April 2003 15.36, [EMAIL PROTECTED] wrote: i remember i have read a statement about a lock free ringbuffer implemented in C somewhere. Can anybody remeber it ? Here's one in C; the 'sfifo': http://olofson.net/mixed.html I've been using it in various environments for

Re: [linux-audio-dev] Lock Free Ringbuffer in C ?

2003-04-04 Thread torbenh
On Fri, Apr 04, 2003 at 12:47:28PM +0200, David Olofson wrote: On Thursday 03 April 2003 15.36, [EMAIL PROTECTED] wrote: i remember i have read a statement about a lock free ringbuffer implemented in C somewhere. Can anybody remeber it ? Here's one in C; the 'sfifo':

Re: [linux-audio-dev] Lock Free Ringbuffer in C ?

2003-04-04 Thread Paul Davis
but how do i handle this sensibly ? res = sfifo_write(sf, buf, j); if(res != j) { printf(Write failed!\n); // eeek... no i dont want that... there are several solutions, none of them particularly good. the best is to wait on a FIFO. these provide a fast, 99%

[linux-audio-dev] Lock Free Ringbuffer in C ?

2003-04-03 Thread torbenh
i remember i have read a statement about a lock free ringbuffer implemented in C somewhere. Can anybody remeber it ? -- torben Hohn http://galan.sourceforge.net -- The graphical Audio language

Re: [linux-audio-dev] Lock Free Ringbuffer in C ?

2003-04-03 Thread rm
On Thu, Apr 03, 2003 at 03:36:32PM +0200, [EMAIL PROTECTED] wrote: i remember i have read a statement about a lock free ringbuffer implemented in C somewhere. courtesy of paul davis: you should use a lock free ringbuffer. we will be adding example code to the example-clients

Re: [linux-audio-dev] Lock Free Ringbuffer in C ?

2003-04-03 Thread Vincent Touquet
On Thu, Apr 03, 2003 at 03:36:32PM +0200, [EMAIL PROTECTED] wrote: i remember i have read a statement about a lock free ringbuffer implemented in C somewhere. Can anybody remeber it ? I think it is in the Ardour sources ? I will try to hunt down the relevant post. regards, v