12 #include "../mythreads.h"
16 struct ScheduleThreadData
19 volatile bool shutdown;
20 volatile bool *errorSignal;
30 static ScheduleThreadData S_scheduleThreadData;
32 static void* ScheduleThreadWorkerFunction(
void* pThreadData )
34 const ScheduleThreadData* pScheduleThreadData = (ScheduleThreadData*)pThreadData;
38 while( !error && !pScheduleThreadData->shutdown ) {
46 for (
size_t k=0; k<60 && !pScheduleThreadData->shutdown; ++k)
56 static pthread_t S_hScheduleThread = 0;
60 S_scheduleThreadData.pDcaInstance = &aDcaInstance;
61 S_scheduleThreadData.errorSignal = errorSignal;
63 pthread_create(&S_hScheduleThread, NULL, ScheduleThreadWorkerFunction, (
void*)&S_scheduleThreadData);
68 S_scheduleThreadData.shutdown =
true;
69 pthread_join(S_hScheduleThread, NULL);