This commit is contained in:
Matthew Kennedy 2024-07-11 19:49:49 -04:00 committed by Andrey
parent 1ea80c622d
commit 52261364de
1 changed files with 17 additions and 5 deletions

View File

@ -78,9 +78,7 @@ struct scheduling_s {
virtual_timer_t timer;
#endif /* EFI_SIMULATOR */
/**
* Scheduler implementation uses a sorted linked list of these scheduling records.
*/
// Scheduler implementation uses a sorted linked list of these scheduling records.
scheduling_s *nextScheduling_s = nullptr;
action_s action;
@ -94,9 +92,23 @@ private:
struct ExecutorInterface {
/**
* see also scheduleByAngle
* @brief Schedule an action to be executed in the future.
*
* scheduleByAngle is useful if you want to schedule something in terms of crank angle instead of time.
*
* @param msg Name of this event to use for logging in case of an error.
* @param scheduling Storage to use for the scheduled event. If null, one will be used from the pool.
* @param targetTime When to execute the specified action. If this time is in the past or
* very near future, it may execute immediately.
* @param action An action to execute at the specified time.
*/
virtual void scheduleByTimestampNt(const char *msg, scheduling_s *scheduling, efitick_t targetTime, action_s action) = 0;
/**
* @brief Cancel the specified scheduling_s so that, if currently scheduled, it does not execute.
*
* @param scheduling The scheduling_s to cancel.
*/
virtual void scheduleByTimestampNt(const char *msg, scheduling_s *scheduling, efitick_t timeNt, action_s action) = 0;
virtual void cancel(scheduling_s* scheduling) = 0;
};