summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/objectidtoname.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-02-04 17:16:37 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-02-04 17:16:37 +0000
commit8932955e9a5d87cd41ef1965945a4ccc5c7aed38 (patch)
treeb1fe6c2ebbba3f039f59a37c106b5111fef66479 /cpukit/score/src/objectidtoname.c
parentRegenerate. (diff)
downloadrtems-8932955e9a5d87cd41ef1965945a4ccc5c7aed38.tar.bz2
2008-02-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/src/rtemsobjectsetname.c, score/src/objectgetinfoid.c, score/src/objectgetnameasstring.c, score/src/objectidtoname.c: Handle Object Id of SELF.
Diffstat (limited to 'cpukit/score/src/objectidtoname.c')
-rw-r--r--cpukit/score/src/objectidtoname.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cpukit/score/src/objectidtoname.c b/cpukit/score/src/objectidtoname.c
index bb96010957..52a4813815 100644
--- a/cpukit/score/src/objectidtoname.c
+++ b/cpukit/score/src/objectidtoname.c
@@ -43,6 +43,7 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
{
uint32_t the_api;
uint32_t the_class;
+ Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
@@ -50,11 +51,13 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
if ( !name )
return OBJECTS_INVALID_NAME;
- the_api = _Objects_Get_API( id );
+ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
+
+ the_api = _Objects_Get_API( tmpId );
if ( the_api && the_api > OBJECTS_APIS_LAST )
return OBJECTS_INVALID_ID;
- the_class = _Objects_Get_class( id );
+ the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
if ( !information )
@@ -63,7 +66,7 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
if ( information->is_string )
return OBJECTS_INVALID_ID;
- the_object = _Objects_Get( information, id, &ignored_location );
+ the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;