Changeset f4a8ee1 in rtems for cpukit/score/macros


Ignore:
Timestamp:
Mar 17, 1999, 4:01:03 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
55b8fef2
Parents:
e9e01dd6
Message:

Unlimited objects patch from Chris Johns <ccj@…>. Email follows:

First, the unlimited patch. I have compiled the unlmited patch for the
Linux posix BSP only and it seems to work cleanly. I would like a really
major application run on this change before commiting as the changes are
very core and significant. I am currently building all the tests to run.

I have no targets suitable to test on at the moment.

I have tested the patch for inline functions and macros.

Turning macros on has found some core bugs. I have fixed these but have
not run all the tests. Please review the patch for these changes. They
are:

1) The conditional compilation for MP support broke the core messages
code. You cannot embed a conditional macro in another macro. The Send
and Urgent Send calls are macros.

2) User extensions handler initialisation now has two parameters. I have
updated the macros to support the extra parameter.

The patch also contains the gcc-target-default.cfg fix required to build
the kernel. More of a by product than a fix for you.

Location:
cpukit/score/macros/rtems/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/macros/rtems/score/object.inl

    re9e01dd6 rf4a8ee1  
    9494/*PAGE
    9595 *
    96  *  _Objects_Allocate
     96 *  _Objects_Get_local_object
    9797 *
    9898 */
    9999
    100 #define _Objects_Allocate( _information )  \
    101   (Objects_Control *) _Chain_Get( &(_information)->Inactive )
     100#define _Objects_Get_local_object( information, index ) \
     101  ( ( index > information->maximum) ?  NULL : \
     102                       information->local_table[ index ] )
    102103
    103104/*PAGE
    104105 *
    105  *  _Objects_Free
     106 *  _Objects_Set_local_object
    106107 *
    107108 */
    108109
    109 #define _Objects_Free( _information, _the_object )  \
    110   _Chain_Append( &(_information)->Inactive, &(_the_object)->Node )
     110#define _Objects_Set_local_object( information, index, the_object ) \
     111  { \
     112    if ( index <= information->maximum) \
     113      information->local_table[ index ] = the_object; \
     114  }
     115
     116
     117/*PAGE
     118 *
     119 *  _Objects_Get_information
     120 *
     121 */
     122 
     123#define _Objects_Get_information( id ) \
     124 ( \
     125   ( !_Objects_Is_class_valid( _Objects_Get_class( id ) ) ) ? \
     126     NULL : \
     127     _Objects_Information_table[ _Objects_Get_class( id ) ] \
     128 )
    111129
    112130/*PAGE
  • cpukit/score/macros/rtems/score/userext.inl

    re9e01dd6 rf4a8ee1  
    2424 */
    2525
    26 #define _User_extensions_Handler_initialization( _initial_extensions ) \
     26#define _User_extensions_Handler_initialization( \
     27  number_of_extensions, _initial_extensions \
     28) \
    2729  { \
     30    User_extensions_Control *extension; \
     31    unsigned32               i; \
    2832    _Chain_Initialize_empty( &_User_extensions_List ); \
    2933    \
    3034    if ( (_initial_extensions) ) { \
    31       _User_extensions_Initial.Callouts = *(_initial_extensions); \
    32       _Chain_Append( \
    33         &_User_extensions_List, &_User_extensions_Initial.Node ); \
     35      for (i=0 ; i<number_of_extensions ; i++ ) { \
     36        extension = \
     37           _Workspace_Allocate_or_fatal_error( sizeof(User_extensions_Control) ); \
     38        \
     39        extension->Callouts = _initial_extensions[i]; \
     40        _Chain_Append( &_User_extensions_List, &extension->Node ); \
     41      } \
    3442    } \
    3543  }
Note: See TracChangeset for help on using the changeset viewer.