#include "Notify_Thread.h" #include "ResDataObject.h" #include "common_api.h" //extern Log4CPP::Logger* mLog::gLogger; Notify_Thread::Notify_Thread() { m_pDPC = NULL; } Notify_Thread::~Notify_Thread() { } bool Notify_Thread::Exec() { //check exit flag if (WaitTheThreadEndSign(0) == true) { return false; } ////mLog::FINFO("Drv NotifyT Entry"); if (CheckForPause()) { //mLog::FINFO("Got Pause Evt.Wait Resume"); if (WaitforResume() == false) { //mLog::FINFO("Failed Wait Resume Evt.Exit Thread"); return false; } //mLog::FINFO("Got Resume Evt.Go Normal"); } //dpc work if (m_pDPC) { std::vector> wait = { m_ExitFlag, m_PauseEvt }; if (m_pDPC->OnNotify(wait,2) == 0) { //mLog::FINFO("OnNotify return False"); return false; } return true; } return false; } void Notify_Thread::SetDPC(DriverDPC *pDPC) { m_pDPC = pDPC; }