Changeset 190169fe in rtems


Ignore:
Timestamp:
Dec 10, 2015, 2:30:41 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
2605a48
Parents:
4eee8781
git-author:
Sebastian Huber <sebastian.huber@…> (12/10/15 14:30:41)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/03/16 09:00:56)
Message:

Optional CPU Set Handler initialization

Update #2408.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/src/exinit.c

    r4eee8781 r190169fe  
    3838#include <rtems/score/apimutex.h>
    3939#include <rtems/score/copyrt.h>
    40 #include <rtems/score/cpusetimpl.h>
    4140#include <rtems/score/heap.h>
    4241#include <rtems/score/interr.h>
     
    131130  _SMP_Handler_initialize();
    132131
    133   _CPU_set_Handler_initialization();
    134 
    135132/* MANAGERS */
    136133
  • cpukit/score/include/rtems/score/cpusetimpl.h

    r4eee8781 r190169fe  
    124124#endif
    125125
    126 /**
    127  * @brief Initialize the CPU Set Handler
    128  *
    129  * This routine validates a cpuset sets at least one valid cpu and that
    130  * it does not set any invalid cpus.
    131  */
    132 #if __RTEMS_HAVE_SYS_CPUSET_H__ && defined( RTEMS_SMP )
    133 void _CPU_set_Handler_initialization(void);
    134 #else
    135 #define _CPU_set_Handler_initialization()  do { } while ( 0 )
    136 #endif
    137 
    138126/**@}*/
    139127
  • cpukit/score/include/rtems/sysinit.h

    r4eee8781 r190169fe  
    3131#define RTEMS_SYSINIT_INITIAL_EXTENSIONS         000300
    3232#define RTEMS_SYSINIT_DATA_STRUCTURES            000301
     33#define RTEMS_SYSINIT_CPU_SET                    00030d
    3334#define RTEMS_SYSINIT_USER_EXTENSIONS            000320
    3435#define RTEMS_SYSINIT_CLASSIC_TASKS              000340
  • cpukit/score/src/cpuset.c

    r4eee8781 r190169fe  
    2222#ifdef __RTEMS_HAVE_SYS_CPUSET_H__
    2323#include <sys/cpuset.h>
     24#include <rtems/sysinit.h>
    2425#include <rtems/score/cpusetimpl.h>
    2526#include <rtems/score/assert.h>
     
    3132 * _CPU_set_Handler_initialization
    3233 */
    33 void _CPU_set_Handler_initialization()
     34static void _CPU_set_Handler_initialization()
    3435{
    3536  uint32_t cpu_count;
     
    5051    CPU_SET_S( (int) cpu_index, cpuset_default.setsize, cpuset_default.set );
    5152}
     53
     54RTEMS_SYSINIT_ITEM(
     55  _CPU_set_Handler_initialization,
     56  RTEMS_SYSINIT_CPU_SET,
     57  RTEMS_SYSINIT_ORDER_MIDDLE
     58);
    5259
    5360/**
  • doc/user/init.t

    r4eee8781 r190169fe  
    173173application.
    174174
     175@item RTEMS_SYSINIT_CPU_SET
     176Initializes the global CPU set on SMP configurations in case the application
     177uses this information.
     178
    175179@item RTEMS_SYSINIT_BSP_LIBC
    176180Depending on the application configuration the IO library and root filesystem
  • testsuites/sptests/spsysinit01/init.c

    r4eee8781 r190169fe  
    6666  DATA_STRUCTURES_PRE,
    6767  DATA_STRUCTURES_POST,
     68  CPU_SET_PRE,
     69  CPU_SET_POST,
    6870  USER_EXTENSIONS_PRE,
    6971  USER_EXTENSIONS_POST,
     
    207209}
    208210
     211FIRST(RTEMS_SYSINIT_CPU_SET)
     212{
     213  /* There is nothing to do in case RTEMS_SMP is not defined */
     214  next_step(CPU_SET_PRE);
     215}
     216
     217LAST(RTEMS_SYSINIT_CPU_SET)
     218{
     219  next_step(CPU_SET_POST);
     220}
     221
    209222FIRST(RTEMS_SYSINIT_USER_EXTENSIONS)
    210223{
Note: See TracChangeset for help on using the changeset viewer.