MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / _storage_thread

Method _storage_thread

libraries/AP_HAL_ChibiOS/Scheduler.cpp:629–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627#endif // STM32H7
628
629void Scheduler::_storage_thread(void* arg)
630{
631 Scheduler *sched = (Scheduler *)arg;
632 chRegSetThreadName("storage");
633 while (!sched->_hal_initialized) {
634 sched->delay_microseconds(10000);
635 }
636#if defined STM32H7
637 uint16_t memcheck_counter=0;
638#endif
639 while (true) {
640 sched->delay_microseconds(1000);
641
642 // process any pending storage writes
643 hal.storage->_timer_tick();
644
645#if defined STM32H7
646 if (memcheck_counter++ % 500 == 0) {
647 // run check at 2Hz
648 sched->check_low_memory_is_zero();
649 }
650#endif
651 }
652}
653
654void Scheduler::set_system_initialized()
655{

Callers

nothing calls this directly

Calls 3

delay_microsecondsMethod · 0.45
_timer_tickMethod · 0.45

Tested by

no test coverage detected