Changeset 44e9871 in rtems


Ignore:
Timestamp:
Dec 22, 2015, 8:40:48 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
4e3bb2dd
Parents:
fe100e16
git-author:
Sebastian Huber <sebastian.huber@…> (12/22/15 08:40:48)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/08/16 08:03:33)
Message:

score: Avoid dead code in global construction

Update #2514.

Location:
cpukit
Files:
4 edited

Legend:

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

    rfe100e16 r44e9871  
    3535#include <rtems/posix/config.h>
    3636#include <rtems/rtems/config.h>
     37
     38static void *_POSIX_Global_construction( void *arg )
     39{
     40  Thread_Entry entry_point = (Thread_Entry) Configuration_POSIX_API
     41    .User_initialization_threads_table[ 0 ].thread_entry;
     42
     43  (void) arg;
     44  _Thread_Global_construction( entry_point );
     45}
    3746
    3847void _POSIX_Threads_Initialize_user_threads_body(void)
     
    8594    if ( register_global_construction ) {
    8695      register_global_construction = false;
    87       thread_entry = (void *(*)(void *)) _Thread_Global_construction;
     96      thread_entry = _POSIX_Global_construction;
    8897    }
    8998
  • cpukit/rtems/src/taskinitusers.c

    rfe100e16 r44e9871  
    3131#include <rtems/score/wkspace.h>
    3232#include <rtems/score/apiext.h>
     33
     34static void _RTEMS_Global_construction( rtems_task_argument arg )
     35{
     36  Thread_Entry entry_point = (Thread_Entry)
     37    Configuration_RTEMS_API.User_initialization_tasks_table[ 0 ].entry_point;
     38
     39  (void) arg;
     40  _Thread_Global_construction( entry_point );
     41}
    3342
    3443/*
     
    93102    if ( register_global_construction ) {
    94103      register_global_construction = false;
    95       entry_point = (rtems_task_entry) _Thread_Global_construction;
     104      entry_point = _RTEMS_Global_construction;
    96105    }
    97106
  • cpukit/score/include/rtems/score/threadimpl.h

    rfe100e16 r44e9871  
    326326 * are present.
    327327 */
    328 void *_Thread_Global_construction( void );
     328void _Thread_Global_construction( Thread_Entry entry_point ) RTEMS_NO_RETURN;
    329329
    330330/**
  • cpukit/score/src/threadglobalconstruction.c

    rfe100e16 r44e9871  
    4545#endif
    4646
    47 void *_Thread_Global_construction( void )
     47void _Thread_Global_construction( Thread_Entry entry_point )
    4848{
    4949  Thread_Control *executing;
    50   Thread_Entry    entry_point;
    5150
    5251#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
     
    5756   */
    5857  INIT_NAME();
    59 #endif
    60 
    61 #if defined(RTEMS_POSIX_API)
    62   if ( Configuration_RTEMS_API.number_of_initialization_tasks > 0 ) {
    63 #endif
    64     entry_point = (Thread_Entry)
    65       Configuration_RTEMS_API.User_initialization_tasks_table[ 0 ].entry_point;
    66 #if defined(RTEMS_POSIX_API)
    67   } else {
    68     entry_point = (Thread_Entry)
    69       Configuration_POSIX_API
    70         .User_initialization_threads_table[ 0 ].thread_entry;
    71   }
    7258#endif
    7359
     
    8773
    8874  _Assert_Not_reached();
    89 
    90   return NULL;
    9175}
Note: See TracChangeset for help on using the changeset viewer.