Changeset 37eb717 in rtems for cpukit/posix


Ignore:
Timestamp:
Oct 17, 2017, 9:46:54 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
67015b6
Parents:
3f3f4248
git-author:
Sebastian Huber <sebastian.huber@…> (10/17/17 09:46:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/17/17 10:10:31)
Message:

posix: Simplify _POSIX_Threads_Create_extension()

Move unblocked signals initialization to pthread_create().

Update #2514.

Location:
cpukit/posix/src
Files:
2 edited

Legend:

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

    r3f3f4248 r37eb717  
    123123{
    124124  POSIX_API_Control *api;
    125   POSIX_API_Control *executing_api;
    126125
    127126  api = created->API_Extensions[ THREAD_API_POSIX ];
    128 
    129   /*
    130    *  If the thread is not a posix thread, then all posix signals are blocked
    131    *  by default.
    132    *
    133    *  The check for class == 1 is debug.  Should never really happen.
    134    */
    135   RTEMS_STATIC_ASSERT( SIGNAL_EMPTY_MASK == 0, signals_pending );
    136   if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API
    137        #if defined(RTEMS_DEBUG)
    138          && _Objects_Get_class( created->Object.id ) == 1
    139        #endif
    140   ) {
    141     executing_api = _Thread_Get_executing()->API_Extensions[ THREAD_API_POSIX ];
    142     api->signals_unblocked = executing_api->signals_unblocked;
    143   }
    144127
    145128  api->Sporadic.thread = created;
  • cpukit/posix/src/pthreadcreate.c

    r3f3f4248 r37eb717  
    7575  const Scheduler_Control            *scheduler;
    7676  POSIX_API_Control                  *api;
     77  const POSIX_API_Control            *executing_api;
    7778  int                                 schedpolicy = SCHED_RR;
    7879  struct sched_param                  schedparam;
     
    238239   */
    239240  api = the_thread->API_Extensions[ THREAD_API_POSIX ];
     241  executing_api = executing->API_Extensions[ THREAD_API_POSIX ];
     242
     243  api->signals_unblocked = executing_api->signals_unblocked;
    240244
    241245  api->created_with_explicit_scheduler =
Note: See TracChangeset for help on using the changeset viewer.