Changeset 33c8a14f95a2c378b1f374ff3e2d3e669d4992a3

Show
Ignore:
Timestamp:
06/06/08 16:39:28 (3 months ago)
Author:
Rémi Denis-Courmont <rdenis@simphalempin.com>
git-committer:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1212763168 +0300
git-parent:

[2efddef08d002f95619b37232c52c74baeb696f2]

git-author:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1212763168 +0300
Message:

Do not set a priority for non-realtime threads

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/misc/threads.c

    r2efddef r33c8a14  
    518518            i_priority += config_GetInt( p_this, "rt-offset" ); 
    519519        if( i_priority <= 0 ) 
    520         { 
    521             struct sched_param param = { .sched_priority = -i_priority, }; 
    522520            pthread_attr_setschedpolicy (&attr, SCHED_OTHER); 
    523             pthread_attr_setschedparam (&attr, &param); 
    524         } 
    525521        else 
    526522        {