mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-13 01:07:35 +08:00
Simulation: Set scheduling policy RR for lockstep
This should ensure that all processes do still run at full load.
This commit is contained in:
@@ -265,7 +265,12 @@ WorkQueueManagerRun(int, char **)
|
||||
|
||||
#ifndef __PX4_QURT
|
||||
// schedule policy FIFO
|
||||
|
||||
#if defined(ENABLE_LOCKSTEP_SCHEDULER)
|
||||
int ret_setschedpolicy = pthread_attr_setschedpolicy(&attr, SCHED_RR);
|
||||
#else
|
||||
int ret_setschedpolicy = pthread_attr_setschedpolicy(&attr, SCHED_FIFO);
|
||||
#endif
|
||||
|
||||
if (ret_setschedpolicy != 0) {
|
||||
PX4_ERR("failed to set sched policy SCHED_FIFO (%i)", ret_setschedpolicy);
|
||||
|
||||
Reference in New Issue
Block a user