mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Revert "Don't override existing host thread priorities"
This reverts commit 9b0324f4a7.
Since the plugin is initialized from the GUI thread, this doesn't make
any sense.
This commit is contained in:
+1
-11
@@ -32,17 +32,7 @@ fs::path get_temporary_directory() {
|
||||
}
|
||||
|
||||
bool set_realtime_priority(bool sched_fifo) {
|
||||
// If we're already using SCHED_FIFO then this is likely set by the host,
|
||||
// and we should not make any additional changes
|
||||
if (sched_fifo) {
|
||||
sched_param current_params{};
|
||||
if (sched_getparam(0, ¤t_params) == 0 &&
|
||||
current_params.sched_priority > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
sched_param params{.sched_priority = (sched_fifo ? 5 : 0)};
|
||||
sched_param params{.sched_priority = 5};
|
||||
return sched_setscheduler(0, sched_fifo ? SCHED_FIFO : SCHED_OTHER,
|
||||
¶ms) == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user