2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file SingleTimerExecutor.h
|
|
|
|
*
|
|
|
|
* @date: Apr 18, 2014
|
2017-01-03 03:05:22 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2017
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SINGLETIMEREXECUTOR_H_
|
|
|
|
#define SINGLETIMEREXECUTOR_H_
|
|
|
|
|
|
|
|
#include "scheduler.h"
|
|
|
|
#include "event_queue.h"
|
|
|
|
|
2019-01-08 21:53:54 -08:00
|
|
|
class Executor : public ExecutorInterface {
|
2015-07-10 06:01:56 -07:00
|
|
|
public:
|
|
|
|
Executor();
|
2018-01-28 08:27:33 -08:00
|
|
|
void scheduleByTimestamp(scheduling_s *scheduling, efitimeus_t timeUs, schfunc_t callback, void *param);
|
2015-07-10 06:01:56 -07:00
|
|
|
void onTimerCallback();
|
2017-06-07 19:55:05 -07:00
|
|
|
int timerCallbackCounter;
|
|
|
|
int scheduleCounter;
|
|
|
|
int doExecuteCounter;
|
2015-07-10 06:01:56 -07:00
|
|
|
private:
|
|
|
|
EventQueue queue;
|
|
|
|
bool reentrantFlag;
|
|
|
|
void doExecute();
|
|
|
|
void scheduleTimerCallback();
|
|
|
|
};
|
|
|
|
|
|
|
|
void initSignalExecutorImpl(void);
|
2017-06-07 19:55:05 -07:00
|
|
|
void executorStatistics();
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
#endif /* SINGLETIMEREXECUTOR_H_ */
|