25 #include "backends/platform/psp/thread.h" 26 #include "common/singleton.h" 27 #include "common/list.h" 29 #include "engines/engine.h" 38 virtual int suspend() = 0;
39 virtual int resume() = 0;
53 bool beginCriticalSection();
54 void endCriticalSection();
60 void pollPauseEngine();
81 volatile bool _pauseFlag;
82 volatile bool _pauseFlagOld;
83 volatile PauseState _pauseClientState;
86 volatile bool _suspendFlag;
91 volatile int _criticalCounter;
93 volatile int _PMStatus;
99 kWaitForClientPause = 3,
100 kWaitForClientToFinishPausing = 4,
101 kGettingFlagMutexSuspend = 5,
102 kGotFlagMutexSuspend = 6,
103 kWaitCritSectionSuspend = 7,
104 kDoneWaitingCritSectionSuspend = 8,
105 kGettingListMutexSuspend = 9,
106 kIteratingListSuspend = 10,
107 kDoneIteratingListSuspend = 11,
112 kGettingListMutexResume,
113 kIteratingListResume,
114 kDoneIteratingListResume,
115 kGettingFlagMutexResume,
117 kSignalSuspendedThreadsResume,
118 kDoneSignallingSuspendedThreadsResume,
122 volatile int _listCounter;
127 int getPMStatus()
const {
return _PMStatus; }
132 #define PowerMan PowerManager::instance()
Definition: powerman.h:35
Definition: powerman.h:49
Definition: singleton.h:42