static void dsp_hup_hdlr(int sig) { (void)sig; if (gDsp) { dspStop(gDsp); } }
/* destroy dispatcher */ int dspDestroy(dspT *dsp) { int ret = 1; if (dspStop(dsp) == 0) { TRACE(TRACE_ERROR, "dspStop failed\n"); ret = 0; } if (pthread_mutex_destroy(&dsp->waitMutex) != 0) { TRACE(TRACE_ERROR, "pthread_mutex_destroy failed\n"); ret = 0; } if (pthread_cond_destroy(&dsp->waitCond) != 0) { TRACE(TRACE_ERROR, "pthread_cond_destroy failed\n"); ret = 0; } free(dsp); TRACE(TRACE_VERBOSE, "dspDestroy done\n"); return ret; }