2002-07-05 Joel Sherrill <joel@OARcorp.com>

* macros/rtems/score/object.inl: Corrected implementation of
	_Objects_Open, _Objects_Close, and _Objects_Namespace_remove
	to be consistent with the inline implementation.
This commit is contained in:
Joel Sherrill
2002-07-05 18:15:41 +00:00
parent 485c9741ab
commit e90ff51fd8
4 changed files with 36 additions and 16 deletions

View File

@@ -1,3 +1,9 @@
2002-07-05 Joel Sherrill <joel@OARcorp.com>
* macros/rtems/score/object.inl: Corrected implementation of
_Objects_Open, _Objects_Close, and _Objects_Namespace_remove
to be consistent with the inline implementation.
2002-07-01 Joel Sherrill <joel@OARcorp.com> 2002-07-01 Joel Sherrill <joel@OARcorp.com>
* Mega patch merge to change the format of the object IDs to * Mega patch merge to change the format of the object IDs to

View File

@@ -144,18 +144,20 @@
*/ */
#define _Objects_Open( _information, _the_object, _name ) \ #define _Objects_Open( _information, _the_object, _name ) \
{ \ do { \
unsigned32 _index; \ unsigned32 _index; \
\ \
_index = _Objects_Get_index( (_the_object)->id ); \ _index = _Objects_Get_index( (_the_object)->id ); \
(_information)->local_table[ _index ] = (_the_object); \ (_information)->local_table[ _index ] = (_the_object); \
\ \
if ( (_information)->is_string ) \ 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 \ else \
_Objects_Copy_name_raw( \ /* _Objects_Copy_name_raw( \
(_name), (_the_object)->name, (_information)->name_length ); \ (_name), (_the_object)->name, (_information)->name_length ); */ \
} (_the_object)->name = name; \
} while (0)
/*PAGE /*PAGE
* *
@@ -164,13 +166,14 @@
*/ */
#define _Objects_Close( _information, _the_object ) \ #define _Objects_Close( _information, _the_object ) \
{ \ do { \
unsigned32 _index; \ unsigned32 _index; \
\ \
_index = _Objects_Get_index( (_the_object)->id ); \ _index = _Objects_Get_index( (_the_object)->id ); \
(_information)->local_table[ _index ] = (Objects_Control *) NULL; \ (_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 /*PAGE
* *
@@ -178,6 +181,7 @@
*/ */
#define _Objects_Namespace_remove( _information, _the_object ) \ #define _Objects_Namespace_remove( _information, _the_object ) \
(_the_object)->name = 0 \
_Objects_Clear_name( (_the_object)->name, (_information)->name_length ) _Objects_Clear_name( (_the_object)->name, (_information)->name_length )
#endif #endif

View File

@@ -1,3 +1,9 @@
2002-07-05 Joel Sherrill <joel@OARcorp.com>
* macros/rtems/score/object.inl: Corrected implementation of
_Objects_Open, _Objects_Close, and _Objects_Namespace_remove
to be consistent with the inline implementation.
2002-07-01 Joel Sherrill <joel@OARcorp.com> 2002-07-01 Joel Sherrill <joel@OARcorp.com>
* Mega patch merge to change the format of the object IDs to * Mega patch merge to change the format of the object IDs to

View File

@@ -144,18 +144,20 @@
*/ */
#define _Objects_Open( _information, _the_object, _name ) \ #define _Objects_Open( _information, _the_object, _name ) \
{ \ do { \
unsigned32 _index; \ unsigned32 _index; \
\ \
_index = _Objects_Get_index( (_the_object)->id ); \ _index = _Objects_Get_index( (_the_object)->id ); \
(_information)->local_table[ _index ] = (_the_object); \ (_information)->local_table[ _index ] = (_the_object); \
\ \
if ( (_information)->is_string ) \ 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 \ else \
_Objects_Copy_name_raw( \ /* _Objects_Copy_name_raw( \
(_name), (_the_object)->name, (_information)->name_length ); \ (_name), (_the_object)->name, (_information)->name_length ); */ \
} (_the_object)->name = name; \
} while (0)
/*PAGE /*PAGE
* *
@@ -164,13 +166,14 @@
*/ */
#define _Objects_Close( _information, _the_object ) \ #define _Objects_Close( _information, _the_object ) \
{ \ do { \
unsigned32 _index; \ unsigned32 _index; \
\ \
_index = _Objects_Get_index( (_the_object)->id ); \ _index = _Objects_Get_index( (_the_object)->id ); \
(_information)->local_table[ _index ] = (Objects_Control *) NULL; \ (_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 /*PAGE
* *
@@ -178,6 +181,7 @@
*/ */
#define _Objects_Namespace_remove( _information, _the_object ) \ #define _Objects_Namespace_remove( _information, _the_object ) \
(_the_object)->name = 0 \
_Objects_Clear_name( (_the_object)->name, (_information)->name_length ) _Objects_Clear_name( (_the_object)->name, (_information)->name_length )
#endif #endif