Contrary to process priority increment ("niceness"), thread priority
increment increase in the priority of the thread. So multiplying
negative priorities with -1 was totally wrong here.
On Linux, there is only one non-realtime (SCHED_OTHER) priority, 0, so
the code was failing safe silently. Don't know on other systems.
if( config_GetType( p_this, "rt-offset" ) )
i_priority += config_GetInt( p_this, "rt-offset" );
if( i_priority <= 0 )
- {
- struct sched_param param = { .sched_priority = -i_priority, };
pthread_attr_setschedpolicy (&attr, SCHED_OTHER);
- pthread_attr_setschedparam (&attr, ¶m);
- }
else
{
struct sched_param param = { .sched_priority = +i_priority, };