From e90ff51fd8c2fb35228fe29fa381616ec7f26284 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 5 Jul 2002 18:15:41 +0000 Subject: 2002-07-05 Joel Sherrill * macros/rtems/score/object.inl: Corrected implementation of _Objects_Open, _Objects_Close, and _Objects_Namespace_remove to be consistent with the inline implementation. --- cpukit/score/macros/rtems/score/object.inl | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'cpukit/score/macros/rtems/score/object.inl') diff --git a/cpukit/score/macros/rtems/score/object.inl b/cpukit/score/macros/rtems/score/object.inl index eaac6768f4..6bd7765319 100644 --- a/cpukit/score/macros/rtems/score/object.inl +++ b/cpukit/score/macros/rtems/score/object.inl @@ -144,18 +144,20 @@ */ #define _Objects_Open( _information, _the_object, _name ) \ - { \ + do { \ unsigned32 _index; \ \ _index = _Objects_Get_index( (_the_object)->id ); \ (_information)->local_table[ _index ] = (_the_object); \ \ if ( (_information)->is_string ) \ - _Objects_Copy_name_string( (_name), (_the_object)->name ); \ + /* _Objects_Copy_name_string( (_name), (_the_object)->name ); */\ + (_the_object)->name = name; \ else \ - _Objects_Copy_name_raw( \ - (_name), (_the_object)->name, (_information)->name_length ); \ - } + /* _Objects_Copy_name_raw( \ + (_name), (_the_object)->name, (_information)->name_length ); */ \ + (_the_object)->name = name; \ + } while (0) /*PAGE * @@ -164,13 +166,14 @@ */ #define _Objects_Close( _information, _the_object ) \ - { \ + do { \ unsigned32 _index; \ \ _index = _Objects_Get_index( (_the_object)->id ); \ (_information)->local_table[ _index ] = (Objects_Control *) NULL; \ - _Objects_Clear_name( (_the_object)->name, (_information)->name_length ); \ - } + /* _Objects_Clear_name( (_the_object)->name, (_information)->name_length ); */ \ + (_the_object)->name = 0; \ + } while (0) /*PAGE * @@ -178,6 +181,7 @@ */ #define _Objects_Namespace_remove( _information, _the_object ) \ + (_the_object)->name = 0 \ _Objects_Clear_name( (_the_object)->name, (_information)->name_length ) #endif -- cgit v1.2.3