summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/objectgetnameasstring.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/objectgetnameasstring.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/objectgetnameasstring.c')
-rw-r--r--cpukit/score/src/objectgetnameasstring.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/score/src/objectgetnameasstring.c b/cpukit/score/src/objectgetnameasstring.c
index ac70a5035d..0b8765d49b 100644
--- a/cpukit/score/src/objectgetnameasstring.c
+++ b/cpukit/score/src/objectgetnameasstring.c
@@ -41,6 +41,7 @@ char *_Objects_Get_name_as_string(
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
+ Objects_Id tmpId;
if ( length == 0 )
return NULL;
@@ -48,11 +49,13 @@ char *_Objects_Get_name_as_string(
if ( name == NULL )
return NULL;
- information = _Objects_Get_information_id( id );
+ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
+
+ information = _Objects_Get_information_id( tmpId );
if ( !information )
return NULL;
- the_object = _Objects_Get( information, id, &location );
+ the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
#if defined(RTEMS_MULTIPROCESSING)