Changeset 64ba1a96 in rtems for cpukit/posix


Ignore:
Timestamp:
Nov 8, 2017, 2:29:14 PM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
4a147518
Parents:
7147dc4
git-author:
Sebastian Huber <sebastian.huber@…> (11/08/17 14:29:14)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/09/17 07:12:11)
Message:

posix: Change created_with_explicit_scheduler

Remove POSIX_API_Control::created_with_explicit_scheduler. Add
Thread_Control::was_created_with_inherited_scheduler. This fixes also
pthread_getattr_np() for Classic tasks.

Update #2514.

Location:
cpukit/posix
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/include/rtems/posix/threadsup.h

    r7147dc4 r64ba1a96  
    4141 */
    4242typedef struct {
    43   /** Created with explicit or inherited scheduler. */
    44   bool created_with_explicit_scheduler;
    45 
    4643  /**
    4744   * @brief Control block for the sporadic server scheduling policy.
  • cpukit/posix/src/pthreadcreate.c

    r7147dc4 r64ba1a96  
    251251  api->signals_unblocked = executing_api->signals_unblocked;
    252252
    253   api->created_with_explicit_scheduler =
    254     ( the_attr->inheritsched == PTHREAD_EXPLICIT_SCHED );
     253  the_thread->was_created_with_inherited_scheduler =
     254    ( the_attr->inheritsched == PTHREAD_INHERIT_SCHED );
    255255
    256256  _Priority_Node_set_priority( &api->Sporadic.Low_priority, core_low_prio );
  • cpukit/posix/src/pthreadgetattrnp.c

    r7147dc4 r64ba1a96  
    6161  attr->stacksize = the_thread->Start.Initial_stack.size;
    6262
    63   if ( api->created_with_explicit_scheduler ) {
     63  if ( the_thread->was_created_with_inherited_scheduler ) {
     64    attr->inheritsched = PTHREAD_INHERIT_SCHED;
     65  } else {
    6466    attr->inheritsched = PTHREAD_EXPLICIT_SCHED;
    65   } else {
    66     attr->inheritsched = PTHREAD_INHERIT_SCHED;
    6767  }
    6868
Note: See TracChangeset for help on using the changeset viewer.