Thred priorities on no-PREEMPT_RT (Ubunutu)

This commit is contained in:
Robin E. R. Davies
2024-11-14 16:15:32 -05:00
parent a52a7a2a9a
commit c01f0351f0
14 changed files with 261 additions and 109 deletions
+3 -6
View File
@@ -42,6 +42,7 @@
#include <unistd.h> // for nice(
#include <utility>
#include "util.hpp"
#include "SchedulerPriority.hpp"
using namespace pipedal;
@@ -190,12 +191,8 @@ void HostWorkerThread::ThreadProc() noexcept
{
// run nice +2 (priority -2 on Windows)
SetThreadName("lv2_worker");
errno = 0;
std::ignore = nice(2);
if (errno != 0)
{
std::cout << "Warning: Unable to run Lv2 schedule thread at nice +1" << std::endl;
}
SetThreadPriority(SchedulerPriority::Lv2Scheduler);
try
{