2007-05-16 Joel Sherrill <joel.sherrill@oarcorp.com>

* score/src/objectgetnameasstring.c: Internal threads use string names
	so in the current RTEMS source string object name can NOT be
	disabled. It is probably worth considering converting the internal
	threads to uint32_t style names so all the support for string names
	can be conditionally disabled.
This commit is contained in:
Joel Sherrill
2007-05-16 16:14:44 +00:00
parent f919582d8f
commit b9f0782367
2 changed files with 19 additions and 17 deletions
+8
View File
@@ -1,3 +1,11 @@
2007-05-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/src/objectgetnameasstring.c: Internal threads use string names
so in the current RTEMS source string object name can NOT be
disabled. It is probably worth considering converting the internal
threads to uint32_t style names so all the support for string names
can be conditionally disabled.
2007-05-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/Makefile.am, score/include/rtems/score/timespec.h: Add division
+11 -17
View File
@@ -62,27 +62,21 @@ char *_Objects_Get_name_as_string(
case OBJECTS_LOCAL:
/*
* Neither the Classic nor ITRON APIs use string names.
*/
#ifdef RTEMS_POSIX_API
if ( information->is_string ) {
s = the_object->name;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name;
if ( information->is_string ) {
s = the_object->name;
} else {
uint32_t u32_name = (uint32_t) the_object->name;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
s = lname;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
s = lname;
}
for ( i=0, d=name ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (!isprint(*s)) ? '*' : *s;
*d = (!isprint(*s)) ? '*' : *s;
}
*d = '\0';