git: libthread_xu: Properly inherit the creating thread's sched_priority.

Sascha Wildner swildner at crater.dragonflybsd.org
Sun Feb 2 16:42:20 PST 2014


commit 6cec49168ad7dec1e8fc9ddfbcb77d4b80c51ce0
Author: Sascha Wildner <saw at online.de>
Date:   Mon Feb 3 01:40:21 2014 +0100

    libthread_xu: Properly inherit the creating thread's sched_priority.
    
    When a new thread is created with the inheritsched attribute set to
    PTHREAD_INHERIT_SCHED, then it must inherit the sched_priority
    scheduling parameter from the creating thread, because POSIX sez:
    
    "The following thread scheduling attributes defined by POSIX.1-2008
    are affected by the inheritsched attribute: [...], scheduling parameters
    (schedparam), [...]"
    
    Also:
    
    "For SCHED_FIFO and SCHED_RR, the only required member of the sched_param
    structure is the priority sched_priority. For SCHED_OTHER, the affected
    scheduling parameters are implementation-defined."
    
    For SCHED_OTHER, it will currently inherit the creating thread's
    sched_priority too. We'll see if that poses a problem.

Summary of changes:
 lib/libthread_xu/thread/thr_create.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6cec49168ad7dec1e8fc9ddfbcb77d4b80c51ce0


-- 
DragonFly BSD source repository



More information about the Commits mailing list