Changes between Version 30 and Version 31 of Developer/Projects/SequencedInitialization


Ignore:
Timestamp:
Jun 11, 2010, 4:36:41 PM (10 years ago)
Author:
Wenjie1984
Comment:

/* Open Projects */

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Projects/SequencedInitialization

    v30 v31  
    237237; The method of referencing the sysinit_core struct
    238238
    239 The implement of referencing the sequenced initialization struct. In the every C source code file include initialization function we define a sequencedinitialization 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
    240 ,consider the RTEMS Message API. In the RTEMS Message API's initialization call's source file we create a structure rtems_sysinitinclude 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 theapplication 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 alsoa 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.
     239The 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
     240,consider the RTEMS Message API. In the RTEMS Message API's initialization call's source file we create a structure rtems_sysinit 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 theapplication 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 alsoa 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.
     241
     242Consider the RTEMS Message API as a example, its initialization function is in file msg.c. And we also define the sequenced initialization struct in this file.
     243
     244void _Message_queue_Manager_initialization(void);
     245
     246RTEMS_SYSINIT(STARTUP, _Message_queue_Manager_initialization);