mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-04 06:58:39 -04:00
AP_HAL_Linux: make in_main_thread const and override
# Conflicts: # libraries/AP_HAL_Linux/Scheduler.cpp # libraries/AP_HAL_Linux/Scheduler.h
This commit is contained in:
parent
4cb981afa6
commit
3ef150e9f7
@ -419,6 +419,11 @@ bool Scheduler::in_timerprocess()
|
||||
return _in_timer_proc;
|
||||
}
|
||||
|
||||
bool Scheduler::in_main_thread() const
|
||||
{
|
||||
return pthread_equal(pthread_self(), _main_ctx);
|
||||
}
|
||||
|
||||
void Scheduler::_wait_all_threads()
|
||||
{
|
||||
int r = pthread_barrier_wait(&_initialized_barrier);
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
void resume_timer_procs();
|
||||
|
||||
bool in_timerprocess();
|
||||
bool in_main_thread() const override;
|
||||
|
||||
void register_timer_failsafe(AP_HAL::Proc, uint32_t period_us);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user