supervisor: tick: add supervisor_fake_tick
This commit is contained in:
parent
a9baa0f954
commit
46c5775ba4
@ -88,4 +88,7 @@ void supervisor_run_background_tasks_if_tick() {
|
|||||||
run_background_tasks();
|
run_background_tasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void supervisor_fake_tick() {
|
||||||
|
uint32_t now32 = ticks_ms;
|
||||||
|
background_ticks_ms32 = (now32 - 1);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,13 @@
|
|||||||
* interrupt context.
|
* interrupt context.
|
||||||
*/
|
*/
|
||||||
extern void supervisor_tick(void);
|
extern void supervisor_tick(void);
|
||||||
|
/** @brief Cause background tasks to be called soon
|
||||||
|
*
|
||||||
|
* Normally, background tasks are only run once per tick. For other cases where
|
||||||
|
* an event noticed from an interrupt context needs to be completed by a background
|
||||||
|
* task activity, the interrupt can call supervisor_fake_tick.
|
||||||
|
*/
|
||||||
|
extern void supervisor_fake_tick(void);
|
||||||
/** @brief Get the lower 32 bits of the time in milliseconds
|
/** @brief Get the lower 32 bits of the time in milliseconds
|
||||||
*
|
*
|
||||||
* This can be more efficient than supervisor_ticks_ms64, for sites where a wraparound
|
* This can be more efficient than supervisor_ticks_ms64, for sites where a wraparound
|
||||||
|
Loading…
Reference in New Issue
Block a user