Changeset 934cbe7 in rtems


Ignore:
Timestamp:
May 12, 2020, 5:06:37 AM (2 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
bd750c9e
Parents:
ea2d923
git-author:
Sebastian Huber <sebastian.huber@…> (05/12/20 05:06:37)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/12/20 05:08:16)
Message:

posix: Get real priority in pthread_getattr_np()

This is in line with pthread_setschedparam() and
pthread_getschedparam().

Update #2514.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/pthreadgetattrnp.c

    rea2d923 r934cbe7  
    4141  Thread_CPU_budget_algorithms  budget_algorithm;
    4242  const Scheduler_Control      *scheduler;
     43  Priority_Control              priority;
    4344  bool                          ok;
    4445
     
    6768
    6869  scheduler = _Thread_Scheduler_get_home( the_thread );
    69   attr->schedparam.sched_priority = _POSIX_Priority_From_core(
    70     scheduler,
    71     _Thread_Get_priority( the_thread )
    72   );
    7370  _POSIX_Threads_Get_sched_param_sporadic(
    7471    the_thread,
     
    7673    &attr->schedparam
    7774  );
     75  priority = the_thread->Real_priority.priority;
    7876
    7977  if ( _Thread_Is_joinable( the_thread ) ) {
     
    9896  attr->contentionscope = PTHREAD_SCOPE_PROCESS;
    9997  attr->cputime_clock_allowed = 1;
     98  attr->schedparam.sched_priority = _POSIX_Priority_From_core(
     99    scheduler,
     100    priority
     101  );
    100102  attr->schedpolicy =
    101103    _POSIX_Thread_Translate_to_sched_policy( budget_algorithm );
Note: See TracChangeset for help on using the changeset viewer.