openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/rsyslog/8.1903.0-r0/rsyslog-8.1903.0/runtime/tcpsrv.c
static void stopWorkerPool(void)
{
    int i;
    for (i = 0; i < wrkrMax; ++i)
    {
        pthread_mutex_lock(&wrkrMut);
        pthread_cond_signal(&wrkrInfo[i].run); /* awake wrkr if not running */
        pthread_mutex_unlock(&wrkrMut);
        pthread_join(wrkrInfo[i].tid, NULL);
        DBGPRINTF("tcpsrv: info: worker %d was called %llu times\n", i,
                  wrkrInfo[i].numCalled);
        pthread_cond_destroy(&wrkrInfo[i].run);
    }
    pthread_cond_destroy(&wrkrIdle);
}
/* destroy worker pool structures and wait for workers to terminate
 */
destroy worker pool structures and wait for workers to terminate
destroy worker pool structures and wait for workers to terminate
static void stopWorkerPool(void)
{
    int i;
    for (i = 0; i < wrkrMax; ++i)
    {
        pthread_mutex_lock(&wrkrMut);
        pthread_cond_signal(&wrkrInfo[i].run); 
        pthread_mutex_unlock(&wrkrMut);
        pthread_join(wrkrInfo[i].tid, NULL);
        DBGPRINTF("tcpsrv: info: worker %d was called %llu times\n", i,
                  wrkrInfo[i].numCalled);
        pthread_cond_destroy(&wrkrInfo[i].run);
    }
    pthread_cond_destroy(&wrkrIdle);
}
static void stopWorkerPool ( void ) { int i ; for ( i = 0 ; i < wrkrMax ; ++ i ) { pthread_mutex_lock ( & wrkrMut ) ; pthread_cond_signal ( & wrkrInfo [ i ] . run ) ; pthread_mutex_unlock ( & wrkrMut ) ; pthread_join ( wrkrInfo [ i ] . tid , NULL ) ; DBGPRINTF ( " \n " , i , wrkrInfo [ i ] . numCalled ) ; pthread_cond_destroy ( & wrkrInfo [ i ] . run ) ; } pthread_cond_destroy ( & wrkrIdle ) ; }
destroy worker pool structures and wait for workers to terminate
destroy worker pool structures and wait for workers to terminate
/* awake wrkr if not running */