[telepathy-stream-engine/refs/tags/telepathy-stream-engine_0.5.10] Print warning if thread couldn't be set to RT

Olivier Crête olivier.crete at collabora.co.uk
Mon Oct 26 09:28:25 PDT 2009


---
 src/tp-stream-engine.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/tp-stream-engine.c b/src/tp-stream-engine.c
index 3762f2c..4cd6bd4 100644
--- a/src/tp-stream-engine.c
+++ b/src/tp-stream-engine.c
@@ -1101,9 +1101,14 @@ static void
 setup_realtime_thread (pthread_t thread)
 {
   struct sched_param param;
+  gchar buf[128];
 
   param.sched_priority = 5;
-  pthread_setschedparam (thread, SCHED_RR, &param);
+  if (pthread_setschedparam (thread, SCHED_FIFO, &param))
+    {
+      strerror_r (errno, buf, 128);
+      g_warning ("Could not set sched_param: %s", buf);
+    }
 }
 
 static void
-- 
1.5.6.5




More information about the telepathy-commits mailing list