Changes between Version 36 and Version 37 of Developer/Projects/SequencedInitialization


Ignore:
Timestamp:
Jun 11, 2010, 5:03:50 PM (10 years ago)
Author:
Wenjie1984
Comment:

/* Open Projects */

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Projects/SequencedInitialization

    v36 v37  
    181181 *the second domain is order like before,nomal,after
    182182 */
    183  #define ORDER_BEFORE    0
    184  #define ORDER_NOMAL     1
    185  #define ORDER_AFTER     2
     183 #define RTEMS_SYSINIT_ORDER_BEFORE    0
     184 #define RTEMS_SYSINIT_ORDER_NOMAL     1
     185 #define RTEMS_SYSINIT_ORDER_AFTER     2
    186186 /**
    187187 *the third domain is index
    188188 */
    189  #define INDEX_FIRST    0000   /* first*/
    190  #define INDEX_SECOND   0001   /* second*/
    191  #define INDEX_THIRD    0002   /* third*/
    192  #define INDEX_FOURTH   0003   /* fourth*/
    193  #define INDEX_FIFTH    0004   /* fifth*/
    194  #define INDEX_SIXTH    0005   /* sixth*/
    195  #define INDEX_SEVENTH  0006   /* seventh*/
    196  #define INDEX_EIGHTH   0007   /* eighth*/
    197  #define INDEX_NINTH    0008   /* ninth*/
    198  #define INDEX_TENTH    0009   /* tenth*/
    199  #define INDEX_ELEVENTH  0010   /* eleventh*/
    200  #define INDEX_TWELFTH   0011   /* twelfth */
     189 #define RTEMS_SYSINIT_INDEX_FIRST    0000   /* first*/
     190 #define RTEMS_SYSINIT_INDEX_SECOND   0001   /* second*/
     191 #define RTEMS_SYSINIT_INDEX_THIRD    0002   /* third*/
     192 #define RTEMS_SYSINIT_INDEX_FOURTH   0003   /* fourth*/
     193 #define RTEMS_SYSINIT_INDEX_FIFTH    0004   /* fifth*/
     194 #define RTEMS_SYSINIT_INDEX_SIXTH    0005   /* sixth*/
     195 #define RTEMS_SYSINIT_INDEX_SEVENTH  0006   /* seventh*/
     196 #define RTEMS_SYSINIT_INDEX_EIGHTH   0007   /* eighth*/
     197 #define RTEMS_SYSINIT_INDEX_NINTH    0008   /* ninth*/
     198 #define RTEMS_SYSINIT_INDEX_TENTH    0009   /* tenth*/
     199 #define RTEMS_SYSINIT_INDEX_ELEVENTH  0010   /* eleventh*/
     200 #define RTEMS_SYSINIT_INDEX_TWELFTH   0011   /* twelfth */
    201201 /**
    202202 *the defination of combination of domains
     
    212212 *The type of handler invoked when constructing
    213213 */
    214  typedef void ( *sysinit_handler )( void );
     214 typedef void ( *rtems_sysinit_handler )( void );
    215215
    216216 /**
    217217 *The core constructe of sysinit
    218218 */
    219  typedef struct sysinit_core {
     219 typedef struct rtems_sysinit {
    220220  /**
    221221  *this field is not sure, in the future we will add other fields
     
    225225  The handler invoked when constructing
    226226  */
    227   sysinit_handler handler;
    228  } sysinit_core;
     227  rtems_sysinit_handler handler;
     228 } rtems_sysinit;
    229229
    230230 #define RTEMS_SYSINIT(order, handler) \
    231   sysinit_core rtems_sysinit_ ## handler = { \
     231  rtems_sysinit rtems_sysinit_ ## handler = { \
    232232  order, \
    233233  handler, \
     
    235235
    236236 #define RTEMS_SYSINIT_REF(subsystem, index, order, handler) \
    237   extern sysinit_core rtems_sysinit_ ## handler; \
     237  extern rtems_sysinit rtems_sysinit_ ## handler; \
    238238  void const * const rtems_sysinit_ ## handler ## subsystem ## index ## order ## _ref \
    239239  __attribute__((section(".rtems.sysinit." RTEMS_SYSINIT_MAKE_ORDER(subsystem, index, order))))\
     
    254254Then we reference the sequenced initialization struct in the file Msgcreat.c which contains rtems_message_queue_create function.
    255255
    256  RTEMS_SYSINIT_REF(SI_SUB_RTEMS_API, SI_INDEX_SIXTH, ORDER_NOMAL,
     256 RTEMS_SYSINIT_REF(RTEMS_SYSINIT_CLASS_API,RTEMS_SYSINIT_INDEX_SIXTH, RTEMS_SYSINIT_ORDER_NOMAL,
    257257 _Message_queue_Manager_initialization);