[Jack-Devel] JACK 2 is not real time safe on posix?
Hello,
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():
JackClient::CallProcessCallback()
-> JackClient::CycleWaitAux()
-> JackClient::WaitSync()
-> JackGraphManager::SuspendRefNum()
-> JackConnectionManager::SuspendRefNum()
-> virtual JackSynchro::TimedWait()
However, I found only two classes in the `posix' folder that implement this virtual function:
* JackPosixSemaphore: uses `sem_timedwait()' to block
* JackFifo: uses `read()' to block
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].
So how can JACK claim it would be realtime? (No objections, I just don't understand it)
Best,
Johannes
[1] http://jackaudio.org/files/docs/html/group__ClientCallbacks.html#gafb5ec9fb4b736606d676c135fb97888b
1429437563.9317_0.ltw:2, <trinity-eb4cdb4c-9d8b-4320-aab8-83e1dad04d17-1429437555410 at 3capp-gmx-bs63>