From a8bf8ede01976f5ceda357a99b1a09f2d0041b0e Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Wed, 14 Nov 2018 12:11:57 +0100
Subject: [PATCH] event/Thread: reduce the RTIO timer slack to 10us

MPD's default is 100ms, which is too long for the real-time I/O
thread.  The OutputThread has 100us, but the real-time I/O thread
might have tighter deadlines.

This change has currently no effect (I believe), because nobody uses
timers on the RTIO thread.
---
 src/event/Thread.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/event/Thread.cxx b/src/event/Thread.cxx
index 053b3559f..bad2ad1ba 100644
--- a/src/event/Thread.cxx
+++ b/src/event/Thread.cxx
@@ -20,6 +20,7 @@
 #include "config.h"
 #include "Thread.hxx"
 #include "thread/Name.hxx"
+#include "thread/Slack.hxx"
 #include "thread/Util.hxx"
 #include "Log.hxx"
 
@@ -46,6 +47,8 @@ EventThread::Run() noexcept
 	SetThreadName(realtime ? "rtio" : "io");
 
 	if (realtime) {
+		SetThreadTimerSlackUS(10);
+
 		try {
 			SetThreadRealtime();
 		} catch (...) {