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] :: http://kuku.eu.org ::
:: [hidden email]  :: radio bez kitu :: http://bezkitu.com ::


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel