rusefi/firmware/controllers/system/SingleTimerExecutor.h

29 lines
635 B
C
Raw Normal View History

2014-08-29 07:52:33 -07:00
/**
* @file SingleTimerExecutor.h
*
* @date: Apr 18, 2014
2015-01-12 15:04:10 -08:00
* @author Andrey Belomutskiy, (c) 2012-2015
2014-08-29 07:52:33 -07:00
*/
#ifndef SINGLETIMEREXECUTOR_H_
#define SINGLETIMEREXECUTOR_H_
#include "scheduler.h"
#include "event_queue.h"
class Executor {
public:
Executor();
2014-11-17 16:03:26 -08:00
void schedule(scheduling_s *scheduling, uint64_t nowUs, int delayUs, schfunc_t callback, void *param);
2015-01-19 12:05:26 -08:00
void scheduleByTime(scheduling_s *scheduling, efitimeus_t timeUs, schfunc_t callback, void *param);
2014-09-14 13:04:20 -07:00
void onTimerCallback();
2014-08-29 07:52:33 -07:00
private:
EventQueue queue;
2014-11-25 13:03:16 -08:00
bool reentrantFlag;
2014-09-14 13:04:20 -07:00
void doExecute();
2014-08-29 07:52:33 -07:00
};
void initSignalExecutorImpl(void);
#endif /* SINGLETIMEREXECUTOR_H_ */