mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Fix reverting to SCHED_OTHER
This still seemed to work, but the `sched_setscheduler` would return an error code when the priority is set to 5 for SCHED_OTHER (which is of course not a valid value here).
This commit is contained in:
@@ -42,7 +42,7 @@ bool set_realtime_priority(bool sched_fifo) {
|
||||
}
|
||||
}
|
||||
|
||||
sched_param params{.sched_priority = 5};
|
||||
sched_param params{.sched_priority = (sched_fifo ? 5 : 0)};
|
||||
return sched_setscheduler(0, sched_fifo ? SCHED_FIFO : SCHED_OTHER,
|
||||
¶ms) == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user