|
@ -48,6 +48,7 @@ class ZOSSchduler { |
|
|
*******************************************************************************/ |
|
|
*******************************************************************************/ |
|
|
list<PeriodJob*> m_periodJobs; |
|
|
list<PeriodJob*> m_periodJobs; |
|
|
ZOSThread m_thread; |
|
|
ZOSThread m_thread; |
|
|
|
|
|
uint32_t ticket = 0; |
|
|
|
|
|
|
|
|
public: |
|
|
public: |
|
|
ZOSSchduler() {} |
|
|
ZOSSchduler() {} |
|
@ -57,9 +58,8 @@ class ZOSSchduler { |
|
|
void regPeriodJob(function<void(Context& context)> job, uint32_t period_ms); |
|
|
void regPeriodJob(function<void(Context& context)> job, uint32_t period_ms); |
|
|
void startSchedule(const char* threadname, int stack_size, osPriority priority); |
|
|
void startSchedule(const char* threadname, int stack_size, osPriority priority); |
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
|
private: |
|
|
void loop(); |
|
|
void loop(); |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// #define ZHAL_CORE_REG(period_ms, job) ZOSSchduler::getInstance()->regPeriodJob([this](ZOSSchduler::Context& context) { job }, period_ms);
|
|
|
// #define ZHAL_CORE_REG(period_ms, job) ZOSSchduler::getInstance()->regPeriodJob([this](ZOSSchduler::Context& context) { job }, period_ms);
|
|
|