[linux-audio-dev] Lock Free Ringbuffer in C ?
Paul Davis
paul at linuxaudiosystems.com
Fri Apr 4 07:47:01 UTC 2003
>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
More information about the Linux-audio-dev
mailing list