thread/Util: lower the real-time priority from 50 to 40

On linux-rt, kernel IRQ threads are configured with priority=50, and
this change configures MPD somewhat below that priority, leaving some
room for other programs to be configured in between.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/643
This commit is contained in:
Max Kellermann
2019-10-09 14:40:02 +02:00
parent 2f3e94f8d0
commit c89c7f71a2
5 changed files with 10 additions and 9 deletions

View File

@@ -101,7 +101,7 @@ SetThreadRealtime()
{
#ifdef __linux__
struct sched_param sched_param;
sched_param.sched_priority = 50;
sched_param.sched_priority = 40;
int policy = SCHED_FIFO;
#ifdef SCHED_RESET_ON_FORK