Changes between Version 51 and Version 52 of Developer/Projects/SequencedInitialization


Ignore:
Timestamp:
Jun 15, 2010, 4:39:39 PM (9 years ago)
Author:
Sh
Comment:

Iterate functions

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Projects/SequencedInitialization

    v51 v52  
    241241   = &SYSINIT_ENTRY_NAME(handler)
    242242
     243 /**
     244  * @brief Iterates through all entries of the system initialization set.
     245  *
     246  * Calls each handler with the @a state parameter.
     247  */
     248 void _Sysinit_Iterate(Sysinit_State state);
     249 
     250 /**
     251  * @brief Iterates through all entries of the system initialization set in
     252  * reversed order.
     253  *
     254  * Calls each handler with the @a state parameter.
     255  */
     256 void _Sysinit_Iterate_reversed(Sysinit_State state);
     257
    243258The implement of referencing the sequenced initialization struct. In the every C source code file include initialization function we define a sequenced initialization struct which contain the init function entry. And then a reference function point will be defined in the another file include a function which will be called if this object is used by application. For example
    244259,consider the RTEMS Message API. In the RTEMS Message API's initialization call's source file we create a structure Sysinit_Entry include the field of the RTEMS Message API's initialization call entry. Then we reference this variable from the source file containing the rtems_message_queue_create code. Because the application must make a call to rtems_message_queue_create or all the other Message API calls will fail therefore this API needs only one reference from a single source file. But there is also a exception that if the application use RTEMS Event and RTEMS Signal API there is no similar call like rtems_message_queue_creat which the application must call or it will fail. '''So we must consider another method to solve this problem. Now we donot have a better way to fix it.'''