Changeset e5e757b in rtems-schedsim


Ignore:
Timestamp:
May 26, 2014, 6:26:41 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
master
Children:
d8918c1
Parents:
968d2b2
Message:

_Thread_Dispatch wrapper is now shared between uniprocessor and SMP configurations

Location:
schedsim/shell
Files:
1 deleted
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • schedsim/shell/schedsim_priority/Makefile.am

    r968d2b2 re5e757b  
    11bin_PROGRAMS = schedsim_priority
    22schedsim_priority_SOURCES = config.c
    3 schedsim_priority_SOURCES += wrap_thread_dispatch.c
    43schedsim_priority_SOURCES += $(srcdir)/../shared/add_commands_stub.c
    54
  • schedsim/shell/schedsim_smppriority/Makefile.am

    r968d2b2 re5e757b  
    44SOURCES += $(srcdir)/../schedsim_smpsimple/add_commands.c
    55SOURCES += $(srcdir)/../schedsim_smpsimple/main_dump_ready_tasks.c
    6 SOURCES += $(srcdir)/../schedsim_smpsimple/wrap_thread_dispatch.c
    76schedsim_smppriority_SOURCES = $(SOURCES)
    87
  • schedsim/shell/schedsim_smppriority_affinity/Makefile.am

    r968d2b2 re5e757b  
    44SOURCES += $(srcdir)/../schedsim_smpsimple/add_commands.c
    55SOURCES += $(srcdir)/../schedsim_smpsimple/main_dump_ready_tasks.c
    6 SOURCES += $(srcdir)/../schedsim_smpsimple/wrap_thread_dispatch.c
    76schedsim_smppriority_affinity_SOURCES = $(SOURCES)
    87
  • schedsim/shell/schedsim_smpsimple/Makefile.am

    r968d2b2 re5e757b  
    44schedsim_smpsimple_SOURCES += config.c
    55schedsim_smpsimple_SOURCES += main_dump_ready_tasks.c
    6 schedsim_smpsimple_SOURCES += wrap_thread_dispatch.c
    76
    87cpukitdir=@rtems_srcdir@/cpukit
  • schedsim/shell/shared/Makefile.am

    r968d2b2 re5e757b  
    5353libschedsim_a_SOURCES += shell_cmdset.c
    5454libschedsim_a_SOURCES += shell_makeargs.c
     55libschedsim_a_SOURCES += wrap_thread_dispatch.c
    5556if HAS_SMP
    5657libschedsim_a_SOURCES += smp_stub.c
  • schedsim/shell/shared/smp_stub.c

    r968d2b2 re5e757b  
    1717#include <stdlib.h>
    1818
     19/*
     20 * Actually owned by the _Thread_Dispatch() wrapper.
     21 * This way the variable is available all the time.
     22 */
     23extern uint32_t Schedsim_Current_cpu;
     24
    1925#if RTEMS_SMP
    20   uint32_t Schedsim_Current_cpu;
    2126  extern uint32_t Schedsim_Maximum_CPUs_From_Command_Line;
    2227#endif
  • schedsim/shell/shared/wrap_thread_dispatch.c

    r968d2b2 re5e757b  
    1818
    1919typedef Thread_Control * Thread_Control_ptr;
    20 extern uint32_t Schedsim_Current_cpu;
     20uint32_t Schedsim_Current_cpu = 0;
    2121
    2222Thread_Control_ptr *last_heir = NULL;
     
    2525extern void __real__Thread_Dispatch(void);
    2626
     27#if RTEMS_SMP
     28  #define MAX_CPUS _SMP_Processor_count
     29#else
     30  #define MAX_CPUS 1
     31#endif
     32
    2733void Init__wrap__Thread_Dispatch()
    2834{
    2935  last_heir = (Thread_Control_ptr *) calloc(
    3036    sizeof( Thread_Control_ptr ),
    31     _SMP_Processor_count
     37    MAX_CPUS
    3238  );
    3339  last_executing =  (Thread_Control_ptr *) calloc(
    3440    sizeof( Thread_Control_ptr ),
    35     _SMP_Processor_count
     41    MAX_CPUS
    3642  );
    3743}
     
    5965
    6066  current_cpu = Schedsim_Current_cpu;
    61   for ( cpu=0 ; cpu < _SMP_Processor_count ; cpu++ ) {
     67  for ( cpu=0 ; cpu < MAX_CPUS ; cpu++ ) {
    6268    Schedsim_Current_cpu = cpu;
    6369    check_heir_and_executing();
Note: See TracChangeset for help on using the changeset viewer.