ChibiOS 21.11.4

Detailed Description

Time and Virtual Timers related APIs and services.

Collaboration diagram for Virtual Timers:

Functions

static void vt_set_alarm (systime_t now, sysinterval_t delay)
 Alarm time setup.
static void vt_insert_first (virtual_timers_list_t *vtlp, virtual_timer_t *vtp, systime_t now, sysinterval_t delay)
 Inserts a timer as first element in a delta list.
static void vt_enqueue (virtual_timers_list_t *vtlp, virtual_timer_t *vtp, sysinterval_t delay)
 Enqueues a virtual timer in a virtual timers list.
void chVTDoSetI (virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
 Enables a one-shot virtual timer.
void chVTDoSetContinuousI (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.
sysinterval_t chVTGetRemainingIntervalI (virtual_timer_t *vtp)
 Returns the remaining time interval before next timer trigger.
void chVTDoTickI (void)
 Virtual timers ticker.
systimestamp_t chVTGetTimeStampI (void)
 Generates a monotonic time stamp.
void chVTResetTimeStampI (void)
 Resets and re-synchronizes the time stamps monotonic counter.
static void chVTObjectInit (virtual_timer_t *vtp)
 Initializes a virtual_timer_t object.
static systime_t chVTGetSystemTimeX (void)
 Current system time.
static systime_t chVTGetSystemTime (void)
 Current system time.
static sysinterval_t chVTTimeElapsedSinceX (systime_t start)
 Returns the elapsed time since the specified start time.
static bool chVTIsSystemTimeWithinX (systime_t start, systime_t end)
 Checks if the current system time is within the specified time window.
static bool chVTIsSystemTimeWithin (systime_t start, systime_t end)
 Checks if the current system time is within the specified time window.
static bool chVTGetTimersStateI (sysinterval_t *timep)
 Returns the time interval until the next timer event.
static bool chVTIsArmedI (const virtual_timer_t *vtp)
 Returns true if the specified timer is armed.
static bool chVTIsArmed (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 chVTReset (virtual_timer_t *vtp)
 Disables a Virtual Timer.
static void chVTSetI (virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
 Enables a one-shot virtual timer.
static void chVTSet (virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
 Enables a one-shot virtual timer.
static void chVTSetContinuousI (virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
 Enables a continuous virtual timer.
static void chVTSetContinuous (virtual_timer_t *vtp, sysinterval_t delay, vtfunc_t vtfunc, void *par)
 Enables a continuous virtual timer.
static sysinterval_t chVTGetReloadIntervalX (virtual_timer_t *vtp)
 Returns the current reload value.
static void chVTSetReloadIntervalX (virtual_timer_t *vtp, sysinterval_t reload)
 Changes a timer reload time interval.
static systimestamp_t chVTGetTimeStamp (void)
 Generates a monotonic time stamp.
static void chVTResetTimeStamp (void)
 Resets and re-synchronizes the time stamps monotonic counter.
static void __vt_object_init (virtual_timers_list_t *vtlp)
 Virtual Timers instance initialization.

Function Documentation

◆ vt_set_alarm()

void vt_set_alarm ( systime_t now,
sysinterval_t delay )
static

Alarm time setup.

Note
An RFCU fault is registered if the system time skips past (now + delay), the deadline is skipped forward in order to compensate for the event.
Parameters
[in]nowlast known system time
[in]delaydelay over now

Definition at line 69 of file chvt.c.

References CH_CFG_ST_TIMEDELTA, CH_RFCU_VT_INSUFFICIENT_DELTA, chDbgAssert, chRFCUCollectFaultsI(), chTimeAddX, chTimeDiffX, chVTGetSystemTimeX, and likely.

Referenced by chVTDoResetI(), chVTDoTickI(), and vt_enqueue().

Here is the call graph for this function:

◆ vt_insert_first()

void vt_insert_first ( virtual_timers_list_t * vtlp,
virtual_timer_t * vtp,
systime_t now,
sysinterval_t delay )
static

Inserts a timer as first element in a delta list.

Note
This is the special case when the delta list is initially empty.

Definition at line 131 of file chvt.c.

References CH_CFG_ST_TIMEDELTA, ch_dlist_insert_after(), CH_RFCU_VT_INSUFFICIENT_DELTA, chDbgAssert, chRFCUCollectFaultsI(), chTimeAddX, chTimeDiffX, chVTGetSystemTimeX, ch_virtual_timer::dlist, ch_virtual_timers_list::dlist, ch_virtual_timers_list::lasttime, and likely.

Referenced by chVTDoTickI(), and vt_enqueue().

Here is the call graph for this function:

◆ vt_enqueue()

void vt_enqueue ( virtual_timers_list_t * vtlp,
virtual_timer_t * vtp,
sysinterval_t delay )
static

Enqueues a virtual timer in a virtual timers list.

Definition at line 205 of file chvt.c.

References ch_dlist_insert(), ch_dlist_isempty(), chTimeDiffX, chVTGetSystemTimeX, ch_virtual_timer::dlist, ch_virtual_timers_list::dlist, ch_virtual_timers_list::lasttime, vt_insert_first(), and vt_set_alarm().

Referenced by chVTDoSetContinuousI(), and chVTDoSetI().

Here is the call graph for this function:

◆ chVTDoSetI()

void chVTDoSetI ( virtual_timer_t * vtp,
sysinterval_t delay,
vtfunc_t vtfunc,
void * par )

Enables a one-shot virtual timer.

The timer is enabled and programmed to trigger after the delay specified as parameter.

Precondition
The timer must not be already armed before calling this function.
Note
The callback function is invoked from interrupt context.
Parameters
[out]vtppointer to a virtual_timer_t structure
[in]delaythe number of ticks before the operation timeouts, the special values are handled as follow:
  • TIME_INFINITE is allowed but interpreted as a normal time specification.
  • TIME_IMMEDIATE this value is not allowed.
[in]vtfuncthe timer callback function. After invoking the callback the timer is disabled and the structure can be disposed or reused.
[in]para parameter that will be passed to the callback function
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 277 of file chvt.c.

References chDbgCheck, chDbgCheckClassI, currcore, ch_virtual_timer::func, ch_virtual_timer::par, ch_virtual_timer::reload, TIME_IMMEDIATE, and vt_enqueue().

Referenced by chSchGoSleepTimeoutS(), and chVTSetI().

Here is the call graph for this function:

◆ chVTDoSetContinuousI()

void chVTDoSetContinuousI ( virtual_timer_t * vtp,
sysinterval_t delay,
vtfunc_t vtfunc,
void * par )

Enables a continuous virtual timer.

The timer is enabled and programmed to trigger after the delay specified as parameter.

Precondition
The timer must not be already armed before calling this function.
Note
The callback function is invoked from interrupt context.
Parameters
[out]vtppointer to a virtual_timer_t structure
[in]delaythe number of ticks before the operation timeouts, the special values are handled as follow:
  • TIME_INFINITE is allowed but interpreted as a normal time specification.
  • TIME_IMMEDIATE this value is not allowed.
[in]vtfuncthe timer callback function. After invoking the callback the timer is restarted.
[in]para parameter that will be passed to the callback function
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 314 of file chvt.c.

References chDbgCheck, chDbgCheckClassI, currcore, ch_virtual_timer::func, ch_virtual_timer::par, ch_virtual_timer::reload, TIME_IMMEDIATE, and vt_enqueue().

Referenced by chVTSetContinuousI().

Here is the call graph for this function:

◆ chVTDoResetI()

void chVTDoResetI ( virtual_timer_t * vtp)

Disables a Virtual Timer.

Precondition
The timer must be in armed state before calling this function.
Parameters
[in]vtppointer to a virtual_timer_t structure
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 338 of file chvt.c.

References ch_dlist_dequeue(), ch_dlist_isempty(), ch_dlist_isfirst(), ch_dlist_remove_first(), chDbgAssert, chDbgCheck, chDbgCheckClassI, chTimeDiffX, chVTGetSystemTimeX, chVTIsArmedI(), currcore, ch_delta_list::delta, ch_virtual_timer::dlist, ch_virtual_timers_list::dlist, ch_virtual_timers_list::lasttime, ch_delta_list::next, and vt_set_alarm().

Referenced by chSchGoSleepTimeoutS(), and chVTResetI().

Here is the call graph for this function:

◆ chVTGetRemainingIntervalI()

sysinterval_t chVTGetRemainingIntervalI ( virtual_timer_t * vtp)

Returns the remaining time interval before next timer trigger.

Note
This function can be called while the timer is active.
Parameters
[in]vtppointer to a virtual_timer_t structure
Returns
The remaining time interval.
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 424 of file chvt.c.

References chDbgAssert, chDbgCheckClassI, chTimeDiffX, chVTGetSystemTimeX, currcore, ch_delta_list::delta, ch_virtual_timer::dlist, ch_virtual_timers_list::dlist, ch_virtual_timers_list::lasttime, and ch_delta_list::next.

◆ chVTDoTickI()

void chVTDoTickI ( void )

Virtual timers ticker.

Note
The system lock is released before entering the callback and re-acquired immediately after. It is callback's responsibility to acquire the lock if needed. This is done in order to reduce interrupts jitter when many timers are in use.
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 464 of file chvt.c.

References ch_dlist_dequeue(), ch_dlist_insert(), ch_dlist_isempty(), ch_dlist_notempty(), CH_RFCU_VT_SKIPPED_DEADLINE, chDbgAssert, chDbgCheckClassI, chRFCUCollectFaultsI(), chSysLockFromISR, chSysUnlockFromISR, chTimeAddX, chTimeDiffX, chVTGetSystemTimeX, currcore, ch_delta_list::delta, ch_virtual_timer::dlist, ch_virtual_timers_list::dlist, ch_virtual_timer::func, ch_virtual_timers_list::lasttime, ch_delta_list::next, ch_virtual_timer::par, ch_virtual_timer::reload, ch_virtual_timers_list::systime, unlikely, vt_insert_first(), and vt_set_alarm().

Referenced by chSysTimerHandlerI().

Here is the call graph for this function:

◆ chVTGetTimeStampI()

systimestamp_t chVTGetTimeStampI ( void )

Generates a monotonic time stamp.

This function generates a monotonic time stamp synchronized with the system time. The time stamp has the same resolution of system time.

Note
There is an assumption, this function must be called at least once before the system time wraps back to zero or synchronization is lost. You may use a periodic virtual timer with a very large interval in order to keep time stamps synchronized by calling this function.
Returns
The time stamp.
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 626 of file chvt.c.

References chDbgAssert, chDbgCheckClassI, chTimeDiffX, chVTGetSystemTimeX, currcore, ch_virtual_timers_list::laststamp, and ch_os_instance::vtlist.

Referenced by chVTGetTimeStamp().

◆ chVTResetTimeStampI()

void chVTResetTimeStampI ( void )

Resets and re-synchronizes the time stamps monotonic counter.

Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 657 of file chvt.c.

References chDbgCheckClassI, chVTGetSystemTimeX, and currcore.

Referenced by chVTResetTimeStamp().

◆ chVTObjectInit()

void chVTObjectInit ( virtual_timer_t * vtp)
inlinestatic

Initializes a virtual_timer_t object.

Note
Initializing a timer object is not strictly required because the function chVTSetI() initializes the object too. This function is only useful if you need to perform a chVTIsArmed() check before calling chVTSetI().
Parameters
[out]vtpthe virtual_timer_t structure pointer
Function Class:
Object or module nitializer function.

Definition at line 104 of file chvt.h.

References ch_virtual_timer::dlist, and ch_delta_list::next.

◆ chVTGetSystemTimeX()

systime_t chVTGetSystemTimeX ( void )
inlinestatic

Current system time.

Returns the number of system ticks since the chSysInit() invocation.

Note
The counter can reach its maximum and then restart from zero.
This function can be called from any context but its atomicity is not guaranteed on architectures whose word size is less than systime_t size.
Returns
The system time in ticks.
Function Class:
This is an X-Class API, this function can be invoked from any context.

Definition at line 122 of file chvt.h.

References currcore.

Referenced by __vt_object_init(), chVTGetSystemTime(), chVTIsSystemTimeWithinX(), and chVTTimeElapsedSinceX().

◆ chVTGetSystemTime()

systime_t chVTGetSystemTime ( void )
inlinestatic

Current system time.

Returns the number of system ticks since the chSysInit() invocation.

Note
The counter can reach its maximum and then restart from zero.
Returns
The system time in ticks.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 141 of file chvt.h.

References chSysLock, chSysUnlock, and chVTGetSystemTimeX().

Referenced by chVTIsSystemTimeWithin().

Here is the call graph for this function:

◆ chVTTimeElapsedSinceX()

sysinterval_t chVTTimeElapsedSinceX ( systime_t start)
inlinestatic

Returns the elapsed time since the specified start time.

Parameters
[in]startstart time
Returns
The elapsed time.
Function Class:
This is an X-Class API, this function can be invoked from any context.

Definition at line 159 of file chvt.h.

References chTimeDiffX, and chVTGetSystemTimeX().

Here is the call graph for this function:

◆ chVTIsSystemTimeWithinX()

bool chVTIsSystemTimeWithinX ( systime_t start,
systime_t end )
inlinestatic

Checks if the current system time is within the specified time window.

Note
When start==end then the function returns always false because the time window has zero size.
Parameters
[in]startthe start of the time window (inclusive)
[in]endthe end of the time window (non inclusive)
Return values
truecurrent time within the specified time window.
falsecurrent time not within the specified time window.
Function Class:
This is an X-Class API, this function can be invoked from any context.

Definition at line 177 of file chvt.h.

References chTimeIsInRangeX(), and chVTGetSystemTimeX().

Here is the call graph for this function:

◆ chVTIsSystemTimeWithin()

bool chVTIsSystemTimeWithin ( systime_t start,
systime_t end )
inlinestatic

Checks if the current system time is within the specified time window.

Note
When start==end then the function returns always false because the time window has zero size.
Parameters
[in]startthe start of the time window (inclusive)
[in]endthe end of the time window (non inclusive)
Return values
truecurrent time within the specified time window.
falsecurrent time not within the specified time window.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 195 of file chvt.h.

References chTimeIsInRangeX(), and chVTGetSystemTime().

Here is the call graph for this function:

◆ chVTGetTimersStateI()

bool chVTGetTimersStateI ( sysinterval_t * timep)
inlinestatic

Returns the time interval until the next timer event.

Note
The return value is not perfectly accurate and can report values in excess of CH_CFG_ST_TIMEDELTA ticks.
The interval returned by this function is only meaningful if more timers are not added to the list until the returned time.
Parameters
[out]timeppointer to a variable that will contain the time interval until the next timer elapses. This pointer can be NULL if the information is not required.
Returns
The time, in ticks, until next time event.
Return values
falseif the timers list is empty.
trueif the timers list contains at least one timer.
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 216 of file chvt.h.

References CH_CFG_ST_TIMEDELTA, chDbgCheckClassI, chTimeDiffX, chVTGetSystemTimeX, currcore, ch_delta_list::delta, ch_virtual_timers_list::dlist, ch_virtual_timers_list::lasttime, and ch_delta_list::next.

◆ chVTIsArmedI()

bool chVTIsArmedI ( const virtual_timer_t * vtp)
inlinestatic

Returns true if the specified timer is armed.

Precondition
The timer must have been initialized using chVTObjectInit() or chVTDoSetI().
Parameters
[in]vtpthe virtual_timer_t structure pointer
Returns
true if the timer is armed.
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 248 of file chvt.h.

References chDbgCheckClassI, ch_virtual_timer::dlist, and ch_delta_list::next.

Referenced by chSchGoSleepTimeoutS(), chVTDoResetI(), chVTIsArmed(), and chVTResetI().

◆ chVTIsArmed()

bool chVTIsArmed ( const virtual_timer_t * vtp)
inlinestatic

Returns true if the specified timer is armed.

Precondition
The timer must have been initialized using chVTObjectInit() or chVTDoSetI().
Parameters
[in]vtpthe virtual_timer_t structure pointer
Returns
true if the timer is armed.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 265 of file chvt.h.

References chSysLock, chSysUnlock, and chVTIsArmedI().

Here is the call graph for this function:

◆ chVTResetI()

void chVTResetI ( virtual_timer_t * vtp)
inlinestatic

Disables a Virtual Timer.

Note
The timer is first checked and disabled only if armed.
Precondition
The timer must have been initialized using chVTObjectInit() or chVTDoSetI().
Parameters
[in]vtpthe virtual_timer_t structure pointer
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 285 of file chvt.h.

References chVTDoResetI(), and chVTIsArmedI().

Referenced by chVTReset(), chVTSetContinuousI(), and chVTSetI().

Here is the call graph for this function:

◆ chVTReset()

void chVTReset ( virtual_timer_t * vtp)
inlinestatic

Disables a Virtual Timer.

Note
The timer is first checked and disabled only if armed.
Precondition
The timer must have been initialized using chVTObjectInit() or chVTDoSetI().
Parameters
[in]vtpthe virtual_timer_t structure pointer
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 302 of file chvt.h.

References chSysLock, chSysUnlock, and chVTResetI().

Here is the call graph for this function:

◆ chVTSetI()

void chVTSetI ( virtual_timer_t * vtp,
sysinterval_t delay,
vtfunc_t vtfunc,
void * par )
inlinestatic

Enables a one-shot virtual timer.

If the virtual timer was already enabled then it is re-enabled using the new parameters.

Precondition
The timer must have been initialized using chVTObjectInit() or chVTDoSetI().
Parameters
[in]vtpthe virtual_timer_t structure pointer
[in]delaythe number of ticks before the operation timeouts, the special values are handled as follow:
  • TIME_INFINITE is allowed but interpreted as a normal time specification.
  • TIME_IMMEDIATE this value is not allowed.
[in]vtfuncthe timer callback function. After invoking the callback the timer is disabled and the structure can be disposed or reused.
[in]para parameter that will be passed to the callback function
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 331 of file chvt.h.

References chVTDoSetI(), and chVTResetI().

Referenced by chVTSet().

Here is the call graph for this function:

◆ chVTSet()

void chVTSet ( virtual_timer_t * vtp,
sysinterval_t delay,
vtfunc_t vtfunc,
void * par )
inlinestatic

Enables a one-shot virtual timer.

If the virtual timer was already enabled then it is re-enabled using the new parameters.

Precondition
The timer must have been initialized using chVTObjectInit() or chVTDoSetI().
Parameters
[in]vtpthe virtual_timer_t structure pointer
[in]delaythe number of ticks before the operation timeouts, the special values are handled as follow:
  • TIME_INFINITE is allowed but interpreted as a normal time specification.
  • TIME_IMMEDIATE this value is not allowed.
[in]vtfuncthe timer callback function. After invoking the callback the timer is disabled and the structure can be disposed or reused.
[in]para parameter that will be passed to the callback function
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 360 of file chvt.h.

References chSysLock, chSysUnlock, and chVTSetI().

Here is the call graph for this function:

◆ chVTSetContinuousI()

void chVTSetContinuousI ( virtual_timer_t * vtp,
sysinterval_t delay,
vtfunc_t vtfunc,
void * par )
inlinestatic

Enables a continuous virtual timer.

If the virtual timer was already enabled then it is re-enabled using the new parameters.

Precondition
The timer must have been initialized using chVTObjectInit() or chVTDoSetI().
Parameters
[in]vtpthe virtual_timer_t structure pointer
[in]delaythe number of ticks before the operation timeouts, the special values are handled as follow:
  • TIME_INFINITE is allowed but interpreted as a normal time specification.
  • TIME_IMMEDIATE this value is not allowed.
[in]vtfuncthe timer callback function. After invoking the callback the timer is disabled and the structure can be disposed or reused.
[in]para parameter that will be passed to the callback function
Function Class:
This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

Definition at line 390 of file chvt.h.

References chVTDoSetContinuousI(), and chVTResetI().

Referenced by chVTSetContinuous().

Here is the call graph for this function:

◆ chVTSetContinuous()

void chVTSetContinuous ( virtual_timer_t * vtp,
sysinterval_t delay,
vtfunc_t vtfunc,
void * par )
inlinestatic

Enables a continuous virtual timer.

If the virtual timer was already enabled then it is re-enabled using the new parameters.

Precondition
The timer must have been initialized using chVTObjectInit() or chVTDoSetI().
Parameters
[in]vtpthe virtual_timer_t structure pointer
[in]delaythe number of ticks before the operation timeouts, the special values are handled as follow:
  • TIME_INFINITE is allowed but interpreted as a normal time specification.
  • TIME_IMMEDIATE this value is not allowed.
[in]vtfuncthe timer callback function. After invoking the callback the timer is disabled and the structure can be disposed or reused.
[in]para parameter that will be passed to the callback function
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 419 of file chvt.h.

References chSysLock, chSysUnlock, and chVTSetContinuousI().

Here is the call graph for this function:

◆ chVTGetReloadIntervalX()

sysinterval_t chVTGetReloadIntervalX ( virtual_timer_t * vtp)
inlinestatic

Returns the current reload value.

Parameters
[in]vtpthe virtual_timer_t structure pointer
Returns
The reload value.
Function Class:
This is an X-Class API, this function can be invoked from any context.

Definition at line 435 of file chvt.h.

References ch_virtual_timer::reload.

◆ chVTSetReloadIntervalX()

void chVTSetReloadIntervalX ( virtual_timer_t * vtp,
sysinterval_t reload )
inlinestatic

Changes a timer reload time interval.

Note
This function is meant to be called from a timer callback, it does nothing in any other context.
Calling this function from a one-shot timer callback turns it into a continuous timer.
Parameters
[in]vtpthe virtual_timer_t structure pointer
[in]reloadthe new reload value, zero means no reload
Function Class:
This is an X-Class API, this function can be invoked from any context.

Definition at line 452 of file chvt.h.

References ch_virtual_timer::reload.

◆ chVTGetTimeStamp()

systimestamp_t chVTGetTimeStamp ( void )
inlinestatic

Generates a monotonic time stamp.

This function generates a monotonic time stamp synchronized with the system time. The time stamp has the same resolution of system time.

Note
There is an assumption, this function must be called at least once before the system time wraps back to zero or synchronization is lost. You may use a periodic virtual timer with a very large interval in order to keep time stamps synchronized by calling this function.
Returns
The time stamp.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 474 of file chvt.h.

References chSysLock, chSysUnlock, and chVTGetTimeStampI().

Here is the call graph for this function:

◆ chVTResetTimeStamp()

void chVTResetTimeStamp ( void )
inlinestatic

Resets and re-synchronizes the time stamps monotonic counter.

Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 491 of file chvt.h.

References chSysLock, chSysUnlock, and chVTResetTimeStampI().

Here is the call graph for this function:

◆ __vt_object_init()

void __vt_object_init ( virtual_timers_list_t * vtlp)
inlinestatic

Virtual Timers instance initialization.

Note
Internal use only.
Parameters
[out]vtlppointer to the virtual_timers_list_t structure
Function Class:
Not an API, this function is for internal use only.

Definition at line 509 of file chvt.h.

References ch_dlist_init(), chVTGetSystemTimeX(), ch_virtual_timers_list::dlist, ch_virtual_timers_list::laststamp, ch_virtual_timers_list::lasttime, and ch_virtual_timers_list::systime.

Referenced by chInstanceObjectInit().

Here is the call graph for this function: