On Wednesday 14 November 2001 10:49, Andy Wingo wrote: > > OTOH, if the process() function is not run inside the server, but as a > > thread of the "main" app, how does this save any context switches? > > One other thing I forgot to mention is that the shm memory is only valid > after you receive the 'data ready' signal (i.e., after you can read from > the second fd). Then, once you're done with it, you write on the same fd > to tell the server you're done. > > This is all very implementation-side, so most app writers should not have > to worry about this. but to summarize, process() gets called between > libjack wakes you up from the poll() and before libjack writes on that > fd. > > now, how this reduces context switches, I don't really know ;) could be > something about how poll is implemented, i'll admit my ignorance on this > one. >
By having each client directly call the next client (by writing to the pipe) instead of having the server (jackd) call each client in turn there are less context switches - i.e. the server process is woken up less times. Karl > cheers, > > wingo.
