AP_HAL_VRBRAIN: make in_main_thread const and override

# Conflicts:
#	libraries/AP_HAL_VRBRAIN/Scheduler.cpp
#	libraries/AP_HAL_VRBRAIN/Scheduler.h
This commit is contained in:
Andrew Tridgell 2017-10-29 18:32:22 +11:00
parent 8b472919da
commit 9d897f5da6
2 changed files with 6 additions and 0 deletions

View File

@ -375,6 +375,11 @@ bool VRBRAINScheduler::in_timerprocess()
return getpid() != _main_task_pid;
}
bool VRBRAINScheduler::in_main_thread() const
{
return getpid() == _main_task_pid;
}
void VRBRAINScheduler::system_initialized() {
if (_initialized) {
AP_HAL::panic("PANIC: scheduler::system_initialized called"

View File

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