rusefi-1/firmware/controllers/system/SingleTimerExecutor.h

34 lines
811 B
C
Raw Normal View History

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"
class SingleTimerExecutor : public ExecutorInterface {
2015-07-10 06:01:56 -07:00
public:
SingleTimerExecutor();
2018-01-28 08:27:33 -08:00
void scheduleByTimestamp(scheduling_s *scheduling, efitimeus_t timeUs, schfunc_t callback, void *param);
void scheduleForLater(scheduling_s *scheduling, int delayUs, 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_ */