2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>

* sp34/changepri.c, sp35/priinv.c: Convert the Objects_Name type from a
	simple type to a union of an unsigned 32 bit integer and a pointer.
	This should help eliminate weird casts between u32 and pointers in
	various places. The APIs now have to explicitly call _u32 or _string
	versions of helper routines. This should also simplify things and
	eliminate the need for ugly casts in some cases.
This commit is contained in:
Joel Sherrill
2008-01-23 22:57:54 +00:00
parent ce19f1fa3b
commit 23a368d91e
3 changed files with 12 additions and 3 deletions

View File

@@ -1,3 +1,12 @@
2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp34/changepri.c, sp35/priinv.c: Convert the Objects_Name type from a
simple type to a union of an unsigned 32 bit integer and a pointer.
This should help eliminate weird casts between u32 and pointers in
various places. The APIs now have to explicitly call _u32 or _string
versions of helper routines. This should also simplify things and
eliminate the need for ugly casts in some cases.
2008-01-23 Jennifer Averett <jennifer.averett@OARcorp.com> 2008-01-23 Jennifer Averett <jennifer.averett@OARcorp.com>
* sp42/Makefile.am: New file. * sp42/Makefile.am: New file.

View File

@@ -10,7 +10,7 @@
/********************************************************************/ /********************************************************************/
/* define this to use the RTEMS 4.5 scheme for object names */ /* define this to use the RTEMS 4.5 scheme for object names */
#define TEST_ON_RTEMS_45 /* #define TEST_ON_RTEMS_45 */
/* define this to print the Id of the calling task */ /* define this to print the Id of the calling task */
/* #define TEST_ON_TASK_ID */ /* #define TEST_ON_TASK_ID */
@@ -43,7 +43,7 @@ const char *CallerName()
#if defined(TEST_ON_RTEMS_45) #if defined(TEST_ON_RTEMS_45)
TempName.u = *(uint32_t *)_Thread_Executing->Object.name; TempName.u = *(uint32_t *)_Thread_Executing->Object.name;
#else #else
TempName.u = _Thread_Executing->Object.name; TempName.u = _Thread_Executing->Object.name.name_u32;
#endif #endif
sprintf( buffer, "%c%c%c%c -- %d", sprintf( buffer, "%c%c%c%c -- %d",
TempName.c[0], TempName.c[1], TempName.c[2], TempName.c[3], TempName.c[0], TempName.c[1], TempName.c[2], TempName.c[3],

View File

@@ -84,7 +84,7 @@ const char *CallerName()
#if defined(TEST_ON_RTEMS_45) #if defined(TEST_ON_RTEMS_45)
TempName.u = *(uint32_t *)_Thread_Executing->Object.name; TempName.u = *(uint32_t *)_Thread_Executing->Object.name;
#else #else
TempName.u = (uint32_t) _Thread_Executing->Object.name; TempName.u = (uint32_t) _Thread_Executing->Object.name.name_u32;
#endif #endif
sprintf( buffer, "%c%c%c%c -- %d", sprintf( buffer, "%c%c%c%c -- %d",
TempName.c[0], TempName.c[1], TempName.c[2], TempName.c[3], TempName.c[0], TempName.c[1], TempName.c[2], TempName.c[3],