summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/rtemsobjectsetname.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/rtems/src/rtemsobjectsetname.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/rtems/src/rtemsobjectsetname.c')
-rw-r--r--cpukit/rtems/src/rtemsobjectsetname.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/rtems/src/rtemsobjectsetname.c b/cpukit/rtems/src/rtemsobjectsetname.c
index ccfd8a7b59..42a5f5f235 100644
--- a/cpukit/rtems/src/rtemsobjectsetname.c
+++ b/cpukit/rtems/src/rtemsobjectsetname.c
@@ -34,15 +34,18 @@ rtems_status_code rtems_object_set_name(
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
+ Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
- 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 RTEMS_INVALID_ID;
- the_object = _Objects_Get( information, id, &location );
+ the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
case OBJECTS_LOCAL: