mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Allow setting different priorities than 5
This commit is contained in:
@@ -41,8 +41,8 @@ std::optional<int> get_scheduling_priority() {
|
||||
}
|
||||
}
|
||||
|
||||
bool set_realtime_priority(bool sched_fifo) {
|
||||
sched_param params{.sched_priority = 5};
|
||||
bool set_realtime_priority(bool sched_fifo, int priority) {
|
||||
sched_param params{.sched_priority = (sched_fifo ? priority : 0)};
|
||||
return sched_setscheduler(0, sched_fifo ? SCHED_FIFO : SCHED_OTHER,
|
||||
¶ms) == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user