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/inline/rtems/score/object.inl | 45 +++++------------------------- 1 file changed, 7 insertions(+), 38 deletions(-) (limited to 'cpukit/score/inline/rtems/score/object.inl') diff --git a/cpukit/score/inline/rtems/score/object.inl b/cpukit/score/inline/rtems/score/object.inl index da65807aa1..687ffd923b 100644 --- a/cpukit/score/inline/rtems/score/object.inl +++ b/cpukit/score/inline/rtems/score/object.inl @@ -17,39 +17,6 @@ #ifndef __OBJECTS_inl #define __OBJECTS_inl -/*PAGE - * - * _Objects_Is_name_valid - * - */ - -STATIC INLINE boolean _Objects_Is_name_valid ( - Objects_Name name -) -{ - return ( name != 0 ); -} - -/*PAGE - * - * rtems_name_to_characters - * - */ - -STATIC INLINE void rtems_name_to_characters( - Objects_Name name, - char *c1, - char *c2, - char *c3, - char *c4 -) -{ - *c1 = (name >> 24) & 0xff; - *c2 = (name >> 16) & 0xff; - *c3 = (name >> 8) & 0xff; - *c4 = name & 0xff; -} - /*PAGE * * _Objects_Build_id @@ -186,12 +153,15 @@ STATIC INLINE void _Objects_Open( Objects_Name name ) { - unsigned32 index; + unsigned32 index; 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 @@ -209,8 +179,7 @@ STATIC INLINE void _Objects_Close( 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