Changes between Version 39 and Version 40 of Developer/Projects/SequencedInitialization


Ignore:
Timestamp:
06/15/10 12:28:08 (14 years ago)
Author:
Wenjie1984
Comment:

/* Components Of Rtems Sequenced Initialization API */

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Projects/SequencedInitialization

    v39 v40  
    262262
    263263The 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
    264 ,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.'''
     264,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 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.'''
    265265
    266266Consider 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.