Changeset bc47ec1c in rtems


Ignore:
Timestamp:
Jun 20, 2016, 4:50:12 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
a4fa007b
Parents:
6a6a225
git-author:
Sebastian Huber <sebastian.huber@…> (06/20/16 04:50:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/20/16 06:11:16)
Message:

score: Refine system initialization order

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/sysinit.h

    r6a6a225 rbc47ec1c  
    7373#define RTEMS_SYSINIT_POSIX_USER_THREADS         000707
    7474#define RTEMS_SYSINIT_STD_FILE_DESCRIPTORS       000800
     75#define RTEMS_SYSINIT_LAST                       ffffff
    7576
    7677/*
     
    7980 * order values to form a proper integer literal.
    8081 */
    81 #define RTEMS_SYSINIT_ORDER_FIRST  00
    82 #define RTEMS_SYSINIT_ORDER_MIDDLE 08
    83 #define RTEMS_SYSINIT_ORDER_LAST   0f
     82#define RTEMS_SYSINIT_ORDER_FIRST   00
     83#define RTEMS_SYSINIT_ORDER_SECOND  01
     84#define RTEMS_SYSINIT_ORDER_THIRD   02
     85#define RTEMS_SYSINIT_ORDER_FOURTH  03
     86#define RTEMS_SYSINIT_ORDER_FIFTH   04
     87#define RTEMS_SYSINIT_ORDER_SIXTH   05
     88#define RTEMS_SYSINIT_ORDER_SEVENTH 06
     89#define RTEMS_SYSINIT_ORDER_EIGHTH  07
     90#define RTEMS_SYSINIT_ORDER_NINETH  08
     91#define RTEMS_SYSINIT_ORDER_TENTH   09
     92#define RTEMS_SYSINIT_ORDER_MIDDLE  80
     93#define RTEMS_SYSINIT_ORDER_LAST    ff
    8494
    8595typedef void ( *rtems_sysinit_handler )( void );
  • testsuites/sptests/spsysinit01/init.c

    r6a6a225 rbc47ec1c  
    144144  STD_FILE_DESCRIPTORS_PRE,
    145145  STD_FILE_DESCRIPTORS_POST,
     146  LAST_FIRST,
     147  LAST_SECOND,
     148  LAST_THIRD,
     149  LAST_FOURTH,
     150  LAST_FIFTH,
     151  LAST_SIXTH,
     152  LAST_SEVENTH,
     153  LAST_EIGHTH,
     154  LAST_NINETH,
     155  LAST_TENTH,
     156  LAST_MIDDLE,
     157  LAST_LAST,
    146158  INIT_TASK,
    147159  DONE
     
    166178  static void x##_last(void)
    167179
     180#define LAST_STEP(x) \
     181  static void last_##x(void) \
     182  { \
     183    next_step(LAST_##x); \
     184  } \
     185  RTEMS_SYSINIT_ITEM( \
     186    last_##x, \
     187    RTEMS_SYSINIT_LAST, \
     188    RTEMS_SYSINIT_ORDER_##x \
     189  )
     190
    168191static init_step step;
    169192
     
    675698}
    676699
     700LAST_STEP(FIRST);
     701LAST_STEP(SECOND);
     702LAST_STEP(THIRD);
     703LAST_STEP(FOURTH);
     704LAST_STEP(FIFTH);
     705LAST_STEP(SIXTH);
     706LAST_STEP(SEVENTH);
     707LAST_STEP(EIGHTH);
     708LAST_STEP(NINETH);
     709LAST_STEP(TENTH);
     710LAST_STEP(MIDDLE);
     711LAST_STEP(LAST);
     712
    677713static void Init(rtems_task_argument arg)
    678714{
Note: See TracChangeset for help on using the changeset viewer.