19 #include <ndb_global.h>
21 #include <NdbThread.h>
29 monitor_thread_create_wrapper(
void * arg) {
37 m_pollingInterval = poll;
38 m_changeCondition = NdbCondition_Create();
39 m_changeMutex = NdbMutex_Create();
40 m_monitorThread = NdbThread_Create(monitor_thread_create_wrapper,
41 (NDB_THREAD_ARG*)
this,
44 NDB_THREAD_PRIO_MEAN);
45 m_monitorThreadQuitFlag =
false;
49 NdbThread_Destroy(&m_monitorThread);
50 NdbCondition_Destroy(m_changeCondition);
51 NdbMutex_Destroy(m_changeMutex);
57 NdbMutex_Lock(m_changeMutex);
58 NdbCondition_WaitTimeout(m_changeCondition,
60 m_pollingInterval * 1000);
66 for(
size_t i = 0;
i < proc.size();
i++) {
72 NdbMutex_Unlock(m_changeMutex);
78 NdbCondition_Signal(m_changeCondition);