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


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

/* Open Projects */

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Projects/SequencedInitialization

    v35 v36  
    244244
    245245The 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
    246 ,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.
     246,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.'''
    247247
    248248Consider 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.