William Light wrote: > At the moment, when the audio thread (the JACK callback) needs to send a > message over a channel to another thread, it follows the common codepath > of appending the message to the channel's ring-buffer and then > write()ing to the eventfd. I suspect this is not real-time safe, but is > it something I should lose sleep over?
Well, you should know how your ring buffer behaves (i.e., if it drops the message or blocks when it overflows). As for the eventfd, it could block only if the counter value exceeded 0xfffffffffffffffe. I'd guess your ring buffer cannot get that big. (With the ring buffer and the eventfd, you are implementing what looks like a pipe. If you need to copy the data to the ring buffer anyway, and if your messages and the entire buffer fit into the pipe limits (4 KB and 1 MB), you could simply use a pipe to begin with; see <http://man7.org/linux/man-pages/man7/pipe.7.html>.) Regards, Clemens _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/listinfo/linux-audio-dev
