[LAD] a *simple* ring buffer, comments pls?
Dan Muresan
danmbox at gmail.com
Tue Jul 12 05:40:54 UTC 2011
> For a ringbuffer you need two anyway if the buffer is longer than
> one item, and you want to signal both of 'not empty' and 'not full'
> in the appropriate direction.
Well, if one of the threads is periodic (like a Jack process thread)
it can use sem_getvalue() on the same semaphore to figure things out
-- it doesn't need to be signalled on another semaphore. There are
some small complications that can be solved by double-signalling from
the other thread, or by wasting one slot...
-- Dan
More information about the Linux-audio-dev
mailing list