core: set inheritsched on pthreads
authorIlkka Ollakka <ileoo@videolan.org>
Mon, 26 Sep 2016 17:22:20 +0000 (20:22 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Mon, 26 Sep 2016 17:33:07 +0000 (20:33 +0300)
This makes scheduling options to be passed on thread to be created and
rt-priotities to actually take effect.

src/posix/thread.c

index ec0fbdb..4f5f10e 100644 (file)
@@ -457,6 +457,7 @@ static int vlc_clone_attr (vlc_thread_t *th, pthread_attr_t *attr,
 
         pthread_attr_setschedpolicy (attr, policy);
         pthread_attr_setschedparam (attr, &sp);
+        pthread_attr_setinheritsched (attr, PTHREAD_EXPLICIT_SCHED);
     }
 #else
     (void) priority;