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

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

Subject: Re: [linux-audio-dev] Lock Free Ringbuffer in C ?
From: Paul Davis (paul_AT_linuxaudiosystems.com)
Date: Fri Apr 04 2003 - 15:43:40 EEST


>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% non-blocking way to
get 1 process to wake up another. the "real" solution needs to be
provided by the kernel, and futexes in 2.5/2.6 will be fairly
close. they are still not completely correct for our purposes, but
they will probably work OK.

--p


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

This archive was generated by hypermail 2b28 : Fri Apr 04 2003 - 15:42:03 EEST