Changeset ccd5434 in rtems for cpukit/posix/src/pthreadcreate.c


Ignore:
Timestamp:
01/07/16 08:55:45 (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
1506658c
Parents:
3d1becf
git-author:
Sebastian Huber <sebastian.huber@…> (01/07/16 08:55:45)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/11/16 07:47:01)
Message:

score: Introduce Thread_Entry_information

This avoids potential dead code in _Thread_Handler(). It gets rid of
the dangerous function pointer casts.

Update #2514.

File:
1 edited

Legend:

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

    r3d1becf rccd5434  
    5353)
    5454{
     55  Thread_Entry_information entry = {
     56    .adaptor = _Thread_Entry_adaptor_pointer,
     57    .Kinds = {
     58      .Pointer = {
     59        .entry = start_routine,
     60        .argument = arg
     61      }
     62    }
     63  };
    5564  const pthread_attr_t               *the_attr;
    5665  Priority_Control                    core_priority;
     
    220229   *  POSIX threads are allocated and started in one operation.
    221230   */
    222   status = _Thread_Start(
    223     the_thread,
    224     THREAD_START_POINTER,
    225     start_routine,
    226     arg,
    227     0,                    /* unused */
    228     NULL
    229   );
     231  status = _Thread_Start( the_thread, &entry, NULL );
    230232
    231233  #if defined(RTEMS_DEBUG)
Note: See TracChangeset for help on using the changeset viewer.