AP_HAL_PX4: make in_main_thread const and override

This commit is contained in:
Peter Barker 2017-09-18 11:03:05 +10:00 committed by Andrew Tridgell
parent 044cac42e8
commit 8d208ea514
2 changed files with 2 additions and 2 deletions

View File

@ -443,7 +443,7 @@ void *PX4Scheduler::_uavcan_thread(void *arg)
} }
#endif #endif
bool PX4Scheduler::in_main_thread() bool PX4Scheduler::in_main_thread() const
{ {
return getpid() == _main_task_pid; return getpid() == _main_task_pid;
} }

View File

@ -58,7 +58,7 @@ public:
void resume_timer_procs(); void resume_timer_procs();
void reboot(bool hold_in_bootloader); void reboot(bool hold_in_bootloader);
bool in_main_thread(); bool in_main_thread() const override;
void system_initialized(); void system_initialized();
void hal_initialized() { _hal_initialized = true; } void hal_initialized() { _hal_initialized = true; }