On Wed, Sep 24, 2014 at 6:15 PM, karthik poduval <karthik.poduval(a)gmail.com>
wrote:
You could also use a jack_rigbuffer_t, its lock free
and hence should be
RT thread safe.
You could write a known msg into the ring buffer from the RT thread,
receive the msg from non real-time thread and do event passing from there.
Nope. the poster is looking for a way to notify a different thread that it
would be worth checking out the contents of a ringbuffer.
There are only two ways to do this: either wake the other thread regularly
based on a timer, and hope that the chosen interval and accuracy are enough
to keep the buffer (empty|full) OR wake the other thread as needed. this
second option requires some sort of communication channel to the thread to
wake it, which could be (on linux) any of a pthread_condvar, a semaphore, a
FIFO/pipe, and eventfd, etc. etc.