Go to the documentation of this file.
43 #if (CH_CFG_ST_TIMEDELTA < 0) || (CH_CFG_ST_TIMEDELTA == 1)
44 #error "invalid CH_CFG_ST_TIMEDELTA specified, must " \
45 "be zero or greater than one"
48 #if (CH_CFG_ST_TIMEDELTA > 0) && (CH_CFG_TIME_QUANTUM > 0)
49 #error "CH_CFG_TIME_QUANTUM not supported in tickless mode"
52 #if (CH_CFG_ST_TIMEDELTA > 0) && (CH_DBG_THREADS_PROFILING == TRUE)
53 #error "CH_DBG_THREADS_PROFILING not supported in tickless mode"
118 #if CH_CFG_ST_TIMEDELTA == 0
121 return port_timer_get_time();
216 if (dlp == dlp->
next) {
221 #if CH_CFG_ST_TIMEDELTA == 0
246 return (
bool)(vtp->
func != NULL);
static void chVTSetI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a virtual timer.
void chVTDoTickI(void)
Virtual timers ticker.
static void chSysLock(void)
Enters the kernel lock state.
static systime_t chVTGetSystemTimeX(void)
Current system time.
static bool chVTIsArmedI(const virtual_timer_t *vtp)
Returns true if the specified timer is armed.
static void chVTObjectInit(virtual_timer_t *vtp)
Initializes a virtual_timer_t object.
uint64_t systime_t
Type of system time.
virtual_timers_list_t vtlist
Virtual timers delta list header.
static sysinterval_t chTimeDiffX(systime_t start, systime_t end)
Subtracts two system times returning an interval.
vtfunc_t func
Timer callback function pointer.
static bool chVTGetTimersStateI(sysinterval_t *timep)
Returns the time interval until the next timer event.
static bool chVTIsSystemTimeWithin(systime_t start, systime_t end)
Checks if the current system time is within the specified time window.
void _vt_init(void)
Virtual Timers initialization.
volatile systime_t systime
System Time counter.
sysinterval_t delta
Time delta before timeout.
static void chVTSet(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a virtual timer.
delta_list_t dlist
Delta list header.
static void chVTResetI(virtual_timer_t *vtp)
Disables a Virtual Timer.
void chDbgCheckClassI(void)
I-class functions context check.
Structure representing a Virtual Timer.
ch_system_t ch
System data structures.
uint64_t sysinterval_t
Type of time interval.
void chVTDoResetI(virtual_timer_t *vtp)
Disables a Virtual Timer.
systime_t lasttime
System time of the last tick event.
Structure representing a virtual timers list header.
static bool chVTIsSystemTimeWithinX(systime_t start, systime_t end)
Checks if the current system time is within the specified time window.
static void chSysUnlock(void)
Leaves the kernel lock state.
void chVTDoSetI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a one-shot virtual timer.
void(* vtfunc_t)(void *p)
Type of a Virtual Timer callback function.
#define CH_CFG_ST_TIMEDELTA
Time delta constant for the tick-less mode.
static sysinterval_t chVTTimeElapsedSinceX(systime_t start)
Returns the elapsed time since the specified start time.
static systime_t chVTGetSystemTime(void)
Current system time.
delta_list_t * next
Next timer in the list.
static void chVTReset(virtual_timer_t *vtp)
Disables a Virtual Timer.
static bool chTimeIsInRangeX(systime_t time, systime_t start, systime_t end)
Checks if the specified time is within the specified time range.
Virtual Timer delta list element and header structure.
static bool chVTIsArmed(const virtual_timer_t *vtp)
Returns true if the specified timer is armed.