Example #1
0
static void *
_start_forwarder_instance(void *arg)
{
    void *res = athena_ForwarderEngine(arg);
    pthread_detach(pthread_self());
    return res;
}
Example #2
0
int
main(int argc, char *argv[])
{
    _athenaLogo();
    printf("\n");

    Athena *athena = athena_Create(AthenaDefaultContentStoreSize);

    // Passing in a reference that will be released by athena_Process.  athena_Process is used
    // in athena_InterestControl.c:_Control_Command as the entry point for spawned instances.
    // Spawned instances may not have have time to acquire a reference before our reference is
    // released so the reference is acquired for them.
    if (athena) {
        _parseCommandLine(athena, argc, argv);
        (void) athena_ForwarderEngine(athena_Acquire(athena));
    }
    athena_Release(&athena);
    pthread_exit(NULL); // wait for any residual threads to exit

    return 0;
}