Re: [LAD] Writing to an eventfd from a realtime thread

From: Paul Davis <paul@email-addr-hidden>
Date: Thu Sep 25 2014 - 01:46:04 EEST

On Wed, Sep 24, 2014 at 6:15 PM, karthik poduval <karthik.poduval@email-addr-hidden>
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.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Thu Sep 25 04:15:02 2014

This archive was generated by hypermail 2.1.8 : Thu Sep 25 2014 - 04:15:02 EEST