<div dir="ltr"><div>There can be no such thing as strict real time safety in a system that involves task (context switching). JACK does the best possible approximation given the tools provided by the OS.<br><br></div>You are advised to worry less about the design of JACK internals, which are now over a decade old and known to work extremely well on supported platforms, and worry more about your own JACK client code. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 19, 2015 at 5:59 AM, Johannes Lorenz <span dir="ltr"><<a href="mailto:johannes89@mailueberfall.de" target="_blank">johannes89@mailueberfall.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
it is often being said that JACK 2 is real time safe, for example in the JACK faq. I wondered how JACK 2 suspends a thread, so I checked what happens after the JackClient finished CallProcessCallback():<br>
<br>
  JackClient::CallProcessCallback()<br>
  -> JackClient::CycleWaitAux()<br>
  -> JackClient::WaitSync()<br>
  -> JackGraphManager::SuspendRefNum()<br>
  -> JackConnectionManager::SuspendRefNum()<br>
  -> virtual JackSynchro::TimedWait()<br>
<br>
However, I found only two classes in the `posix' folder that implement this virtual function:<br>
<br>
  * JackPosixSemaphore: uses `sem_timedwait()' to block<br>
  * JackFifo: uses `read()' to block<br>
<br>
However, both `sem_timedwait()' and `read()' are syscalls, so they contain context switch, which means they are non realtime. Actually, the JACK documentation warns to use function like these if you pass a process() callback to jack [1].<br>
<br>
So how can JACK claim it would be realtime? (No objections, I just don't understand it)<br>
<br>
Best,<br>
Johannes<br>
<br>
[1] <a href="http://jackaudio.org/files/docs/html/group__ClientCallbacks.html#gafb5ec9fb4b736606d676c135fb97888b" target="_blank">http://jackaudio.org/files/docs/html/group__ClientCallbacks.html#gafb5ec9fb4b736606d676c135fb97888b</a><br>
_______________________________________________<br>
Jack-Devel mailing list<br>
<a href="mailto:Jack-Devel@lists.jackaudio.org">Jack-Devel@lists.jackaudio.org</a><br>
<a href="http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org" target="_blank">http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org</a><br>
</blockquote></div><br></div>