Changes between Version 17 and Version 18 of Developer/Projects/SequencedInitialization


Ignore:
Timestamp:
Jun 9, 2010, 6:42:56 PM (9 years ago)
Author:
Wenjie1984
Comment:

/* The rule of sort order */

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Projects/SequencedInitialization

    v17 v18  
    166166
    167167Sort order API:
    168  /*the first domain is subsystem*/
    169  #define SI_SUB_RTEMS_API 0001
    170 
    171  /*the second domain is order like before,nomal,after*/
     168 /**
     169 *the first domain is subsystem
     170 */
     171 #define RTEMS_SYSINIT_CLASS_API  0001
     172
     173 /**
     174 *the second domain is order like before,nomal,after
     175 */
    172176 #define ORDER_BEFORE    0
    173177 #define ORDER_NOMAL     1
    174178 #define ORDER_AFTER     2
    175179
    176  /*the third domain is index*/
    177  #define SI_INDEX_FIRST    0000   /* first*/
    178  #define SI_INDEX_SECOND   0001   /* second*/
    179  #define SI_INDEX_THIRD    0002   /* third*/
    180  #define SI_INDEX_FOURTH   0003   /* fourth*/
    181  #define SI_INDEX_FIFTH    0004   /* fifth*/
    182  #define SI_INDEX_SIXTH    0005   /* sixth*/
    183  #define SI_INDEX_SEVENTH  0006   /* seventh*/
    184  #define SI_INDEX_EIGHTH   0007   /* eighth*/
    185  #define SI_INDEX_NINTH    0008   /* ninth*/
    186  #define SI_INDEX_TENTH    0009   /* tenth*/
    187  #define SI_INDEX_ELEVENTH  0010   /* eleventh*/
    188  #define SI_INDEX_TWELFTH   0011   /* twelfth */
     180 /**
     181 *the third domain is index
     182 */
     183 #define INDEX_FIRST    0000   /* first*/
     184 #define INDEX_SECOND   0001   /* second*/
     185 #define INDEX_THIRD    0002   /* third*/
     186 #define INDEX_FOURTH   0003   /* fourth*/
     187 #define INDEX_FIFTH    0004   /* fifth*/
     188 #define INDEX_SIXTH    0005   /* sixth*/
     189 #define INDEX_SEVENTH  0006   /* seventh*/
     190 #define INDEX_EIGHTH   0007   /* eighth*/
     191 #define INDEX_NINTH    0008   /* ninth*/
     192 #define INDEX_TENTH    0009   /* tenth*/
     193 #define INDEX_ELEVENTH  0010   /* eleventh*/
     194 #define INDEX_TWELFTH   0011   /* twelfth */
    189195
    190196 /*the defination of combination of domains*/
     
    197203 /*The core constructe of sysinit*/
    198204 typedef struct sysinit_core {
    199   uint8_t order;
    200   /*The handler invoked when constructing*/
     205  /**
     206  *this field is not sure, in the future we will add other fields
     207  */
     208  uint8_t status;
     209  /**
     210  The handler invoked when constructing
     211  */
    201212  sysinit_handler handler;
    202213 } sysinit_core;
    203214
    204  #define RTEMS_SYSINIT_CORE(order, handler) \
    205   sysinit_core rtems_sysinit_ ## handler ## _core = { \
     215 #define RTEMS_SYSINIT(order, handler) \
     216  sysinit_core rtems_sysinit_ ## handler = { \
    206217  order, \
    207218  handler, \
     
    209220
    210221 #define RTEMS_SYSINIT_REF(subsystem, index, order, handler) \
    211   extern sysinit_core rtems_sysinit_ ## handler ## _core; \
     222  extern sysinit_core rtems_sysinit_ ## handler; \
    212223  void const * const rtems_sysinit_ ## handler ## subsystem ## index ## order ## _ref \
    213224  __attribute__((section(".rtems.sysinit." RTEMS_SYSINIT_MAKE_ORDER(subsystem, index, order))))\
    214225  __attribute__((used)) \
    215226  __attribute__((weak)) \
    216   = &rtems_sysinit_ ## handler ## _core;
     227  = &rtems_sysinit_ ## handler;