self-unloading in-process clients

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

self-unloading in-process clients

Andrzej Szombierski

I'm currently porting some of my JACK code to internal clients to get rid
of context switching latencies (10 clients x 40us context-switch sums up
to 30% of my time-slice). Anyway, I was trying to make the internal
clients unload themselves automatically after the main control
application (also a JACK client) exits, or gets killed. Is there a
"right" way to do this?

Currently I've put a watchdog-like check into the internal client's
process() callback, which returns 1 if the client wishes to be unloaded.
This should work, according to the docs from inprocess.c:

 * This required entry point is called after the client is loaded by
 * jack_internal_client_load().
 * @param client pointer to JACK client structure.
 * @param load_init character string passed to the load operation.
 * @return 0 if successful; otherwise jack_finish() will be called and
 * the client terminated immediately.

Now, the problem is that the jackd doesn't conform to this description, it
simply prints "internal client ... has failed". What is broken, jackd or
the docs?

:: Andrzej Szombierski :: [hidden email] :: ::
:: [hidden email]  :: radio bez kitu :: ::

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
Jackit-devel mailing list
[hidden email]