Changeset 3235ad9 in rtems for c/src/exec/score/inline


Ignore:
Timestamp:
08/23/95 19:30:23 (28 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
5250ff39
Parents:
80e2c29e
Message:

Support for variable length names added to Object Handler. This supports
both fixed length "raw" names and strings from the API's point of view.

Both inline and macro implementations were tested.

Location:
c/src/exec/score/inline
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/inline/object.inl

    r80e2c29e r3235ad9  
    1717#ifndef __OBJECTS_inl
    1818#define __OBJECTS_inl
    19 
    20 /*PAGE
    21  *
    22  *  _Objects_Is_name_valid
    23  *
    24  */
    25 
    26 STATIC INLINE boolean _Objects_Is_name_valid (
    27   Objects_Name name
    28 )
    29 {
    30   return ( name != 0 );
    31 }
    32 
    33 /*PAGE
    34  *
    35  *  rtems_name_to_characters
    36  *
    37  */
    38 
    39 STATIC INLINE void rtems_name_to_characters(
    40   Objects_Name  name,
    41   char         *c1,
    42   char         *c2,
    43   char         *c3,
    44   char         *c4
    45 )
    46 {
    47   *c1 = (name >> 24) & 0xff;
    48   *c2 = (name >> 16) & 0xff;
    49   *c3 = (name >> 8) & 0xff;
    50   *c4 =  name & 0xff;
    51 }
    5219
    5320/*PAGE
     
    187154)
    188155{
    189   unsigned32 index;
     156  unsigned32  index;
    190157
    191158  index = rtems_get_index( the_object->id );
    192159  information->local_table[ index ] = the_object;
    193   information->name_table[ index ]  = name;
    194   the_object->name = &information->name_table[ index ];
     160
     161  if ( information->is_string )
     162    _Objects_Copy_name_string( name, the_object->name );
     163  else
     164    _Objects_Copy_name_raw( name, the_object->name, information->name_length );
    195165}
    196166
     
    210180  index = rtems_get_index( the_object->id );
    211181  information->local_table[ index ] = NULL;
    212   information->name_table[ index ]  = 0;
    213   the_object->name = 0;
     182  _Objects_Clear_name( the_object->name, information->name_length );
    214183}
    215184
  • c/src/exec/score/inline/rtems/score/object.inl

    r80e2c29e r3235ad9  
    1717#ifndef __OBJECTS_inl
    1818#define __OBJECTS_inl
    19 
    20 /*PAGE
    21  *
    22  *  _Objects_Is_name_valid
    23  *
    24  */
    25 
    26 STATIC INLINE boolean _Objects_Is_name_valid (
    27   Objects_Name name
    28 )
    29 {
    30   return ( name != 0 );
    31 }
    32 
    33 /*PAGE
    34  *
    35  *  rtems_name_to_characters
    36  *
    37  */
    38 
    39 STATIC INLINE void rtems_name_to_characters(
    40   Objects_Name  name,
    41   char         *c1,
    42   char         *c2,
    43   char         *c3,
    44   char         *c4
    45 )
    46 {
    47   *c1 = (name >> 24) & 0xff;
    48   *c2 = (name >> 16) & 0xff;
    49   *c3 = (name >> 8) & 0xff;
    50   *c4 =  name & 0xff;
    51 }
    5219
    5320/*PAGE
     
    187154)
    188155{
    189   unsigned32 index;
     156  unsigned32  index;
    190157
    191158  index = rtems_get_index( the_object->id );
    192159  information->local_table[ index ] = the_object;
    193   information->name_table[ index ]  = name;
    194   the_object->name = &information->name_table[ index ];
     160
     161  if ( information->is_string )
     162    _Objects_Copy_name_string( name, the_object->name );
     163  else
     164    _Objects_Copy_name_raw( name, the_object->name, information->name_length );
    195165}
    196166
     
    210180  index = rtems_get_index( the_object->id );
    211181  information->local_table[ index ] = NULL;
    212   information->name_table[ index ]  = 0;
    213   the_object->name = 0;
     182  _Objects_Clear_name( the_object->name, information->name_length );
    214183}
    215184
Note: See TracChangeset for help on using the changeset viewer.