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"
81#if CH_CFG_USE_TIMESTAMP == TRUE
124#if CH_CFG_ST_TIMEDELTA == 0
127 return port_timer_get_time();
222 if (dlp == dlp->
next) {
227#if CH_CFG_ST_TIMEDELTA == 0
458#if (CH_CFG_USE_TIMESTAMP == TRUE) || defined(__DOXYGEN__)
512#if CH_CFG_ST_TIMEDELTA == 0
517#if CH_CFG_USE_TIMESTAMP == TRUE
#define chSysUnlock()
Leaves the kernel lock state.
#define chVTIsSystemTimeWithinX(start, end)
Checks if the current system time is within the specified time window.
#define chSysLock()
Enters the kernel lock state.
#define chVTGetSystemTimeX()
Current system time.
#define chTimeDiffX(start, end)
Subtracts two system times returning an interval.
#define chVTTimeElapsedSinceX(start)
Returns the elapsed time since the specified start time.
#define chDbgCheckClassI()
static void ch_dlist_init(ch_delta_list_t *dlhp)
Delta list initialization.
struct ch_delta_list ch_delta_list_t
Type of a generic bidirectional linked delta list header and element.
struct ch_virtual_timers_list virtual_timers_list_t
Type of virtual timers list header.
struct ch_virtual_timer virtual_timer_t
Type of a Virtual Timer.
void(* vtfunc_t)(virtual_timer_t *vtp, void *p)
Type of a Virtual Timer callback function.
#define CH_CFG_ST_TIMEDELTA
#define currcore
Access to current core's instance structure.
uint64_t systime_t
Type of system time.
static bool chTimeIsInRangeX(systime_t time, systime_t start, systime_t end)
Checks if the specified time is within the specified time range.
uint64_t sysinterval_t
Type of time interval.
uint64_t systimestamp_t
Type of a time stamp.
static void chVTSetI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a one-shot virtual timer.
static systimestamp_t chVTGetTimeStamp(void)
Generates a monotonic time stamp.
void chVTDoTickI(void)
Virtual timers ticker.
void chVTDoSetI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a one-shot virtual timer.
static void __vt_object_init(virtual_timers_list_t *vtlp)
Virtual Timers instance initialization.
static bool chVTGetTimersStateI(sysinterval_t *timep)
Returns the time interval until the next timer event.
void chVTResetTimeStampI(void)
Resets and re-synchronizes the time stamps monotonic counter.
static bool chVTIsArmedI(const virtual_timer_t *vtp)
Returns true if the specified timer is armed.
static void chVTResetI(virtual_timer_t *vtp)
Disables a Virtual Timer.
static void chVTSetReloadIntervalX(virtual_timer_t *vtp, sysinterval_t reload)
Changes a timer reload time interval.
static void chVTSet(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a one-shot virtual timer.
static void chVTObjectInit(virtual_timer_t *vtp)
Initializes a virtual_timer_t object.
sysinterval_t chVTGetRemainingIntervalI(virtual_timer_t *vtp)
Returns the remaining time interval before next timer trigger.
static void chVTResetTimeStamp(void)
Resets and re-synchronizes the time stamps monotonic counter.
static void chVTReset(virtual_timer_t *vtp)
Disables a Virtual Timer.
static systime_t chVTGetSystemTime(void)
Current system time.
systimestamp_t chVTGetTimeStampI(void)
Generates a monotonic time stamp.
void chVTDoSetContinuousI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a continuous virtual timer.
static bool chVTIsArmed(const virtual_timer_t *vtp)
Returns true if the specified timer is armed.
static void chVTSetContinuousI(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a continuous virtual timer.
void chVTDoResetI(virtual_timer_t *vtp)
Disables a Virtual Timer.
static sysinterval_t chVTGetReloadIntervalX(virtual_timer_t *vtp)
Returns the current reload value.
static systime_t chVTGetSystemTimeX(void)
Current system time.
static void chVTSetContinuous(virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
Enables a continuous virtual timer.
static bool chVTIsSystemTimeWithin(systime_t start, systime_t end)
Checks if the current system time is within the specified time window.
ch_delta_list_t * next
Next in the delta list.
sysinterval_t delta
Time interval from previous.
ch_delta_list_t dlist
Delta list element.
sysinterval_t reload
Current reload interval.
volatile uint64_t laststamp
Last generated time stamp.
ch_delta_list_t dlist
Delta list header.
volatile systime_t systime
System Time counter.
systime_t lasttime
System time of the last tick event.