Changeset 3235ad9 in rtems for cpukit/score/macros


Ignore:
Timestamp:
Aug 23, 1995, 7:30:23 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/macros/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 #define _Objects_Is_name_valid( _name ) \
    27   ( (_name) != 0 )
    28 
    29 /*
    30  *  rtems_name_to_characters
    31  *
    32  */
    33 
    34 #define rtems_name_to_characters( _name, _c1, _c2, _c3, _c4 ) \
    35   { \
    36     (*(_c1) = ((_name) >> 24) & 0xff; \
    37     (*(_c2) = ((_name) >> 16) & 0xff; \
    38     (*(_c3) = ((_name) >> 8) & 0xff; \
    39     (*(_c4) = ((_name)) & 0xff; \
    40   }
    4119
    4220/*PAGE
     
    135113    _index = rtems_get_index( (_the_object)->id ); \
    136114    (_information)->local_table[ _index ] = (_the_object); \
    137     (_information)->name_table[ _index ]  = (_name); \
    138     (_the_object)->name = &(_information)->name_table[ _index ]; \
     115    \
     116    if ( (_information)->is_string ) \
     117      _Objects_Copy_name_string( (_name), (_the_object)->name ); \
     118    else \
     119      _Objects_Copy_name_raw( \
     120        (_name), (_the_object)->name, (_information)->name_length ); \
    139121  }
    140122
     
    151133    _index = rtems_get_index( (_the_object)->id ); \
    152134    (_information)->local_table[ _index ] = NULL; \
    153     (_information)->name_table[ _index ]  = 0; \
    154     (_the_object)->name = 0; \
     135    _Objects_Clear_name( (_the_object)->name, (_information)->name_length ); \
    155136  }
    156137
Note: See TracChangeset for help on using the changeset viewer.