<div dir="ltr"><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 24, 2014 at 7:21 AM, William Light <span dir="ltr"><<a href="mailto:wrl@illest.net" target="_blank">wrl@illest.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey everybody,<br>
<br>
I've got this audio app I'm writing which uses message passing to<br>
communicate between threads (similar to the actor model). A message<br>
channel consists of a ring-buffer for the actual message storage, and<br>
then an eventfd so that a thread can block on its channel (or,<br>
importantly, several).<br>
<br>
At the moment, when the audio thread (the JACK callback) needs to send a<br>
message over a channel to another thread, it follows the common codepath<br>
of appending the message to the channel's ring-buffer and then<br>
write()ing to the eventfd. I suspect this is not real-time safe, but is<br>
it something I should lose sleep over?<br></blockquote><div><br>we're still missing measurements on the performance of semaphores, 
fifo's and eventfd's when used for this purpose on modern linux. JACK 
itself uses FIFOs (pipes) on Linux because 10+ years ago they were the 
fastest and most reliable. nobody knows for sure right whether that is 
still true.</div><br></div></div></div>