From 3235ad9a2cd717df901853ad5220a4aaffae84a9 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 23 Aug 1995 19:30:23 +0000 Subject: 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. --- cpukit/score/macros/rtems/score/object.inl | 33 +++++++----------------------- 1 file changed, 7 insertions(+), 26 deletions(-) (limited to 'cpukit/score/macros/rtems') diff --git a/cpukit/score/macros/rtems/score/object.inl b/cpukit/score/macros/rtems/score/object.inl index 6c7caa383a..27675b19bf 100644 --- a/cpukit/score/macros/rtems/score/object.inl +++ b/cpukit/score/macros/rtems/score/object.inl @@ -17,28 +17,6 @@ #ifndef __OBJECTS_inl #define __OBJECTS_inl -/*PAGE - * - * _Objects_Is_name_valid - * - */ - -#define _Objects_Is_name_valid( _name ) \ - ( (_name) != 0 ) - -/* - * rtems_name_to_characters - * - */ - -#define rtems_name_to_characters( _name, _c1, _c2, _c3, _c4 ) \ - { \ - (*(_c1) = ((_name) >> 24) & 0xff; \ - (*(_c2) = ((_name) >> 16) & 0xff; \ - (*(_c3) = ((_name) >> 8) & 0xff; \ - (*(_c4) = ((_name)) & 0xff; \ - } - /*PAGE * * _Objects_Build_id @@ -134,8 +112,12 @@ \ _index = rtems_get_index( (_the_object)->id ); \ (_information)->local_table[ _index ] = (_the_object); \ - (_information)->name_table[ _index ] = (_name); \ - (_the_object)->name = &(_information)->name_table[ _index ]; \ + \ + if ( (_information)->is_string ) \ + _Objects_Copy_name_string( (_name), (_the_object)->name ); \ + else \ + _Objects_Copy_name_raw( \ + (_name), (_the_object)->name, (_information)->name_length ); \ } /*PAGE @@ -150,8 +132,7 @@ \ _index = rtems_get_index( (_the_object)->id ); \ (_information)->local_table[ _index ] = NULL; \ - (_information)->name_table[ _index ] = 0; \ - (_the_object)->name = 0; \ + _Objects_Clear_name( (_the_object)->name, (_information)->name_length ); \ } #endif -- cgit v1.2.3