diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-23 22:57:43 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-23 22:57:43 +0000 |
commit | ce19f1fa3bd9f9760f680ef7839ca136a1c2478a (patch) | |
tree | aa2c0b50ec70dd5c9e8d970aaa7c8deba8fcf330 /cpukit/libmisc | |
parent | 2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-ce19f1fa3bd9f9760f680ef7839ca136a1c2478a.tar.bz2 |
2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/include/rtems/itron/object.h, itron/src/cre_tsk.c,
libblock/src/show_bdbuf.c, libmisc/capture/capture-cli.c,
libmisc/capture/capture.c, libmisc/monitor/mon-manager.c,
libmisc/stackchk/check.c, posix/src/condinit.c,
posix/src/keycreate.c, posix/src/mqueuecreatesupp.c,
posix/src/mqueuedeletesupp.c, posix/src/mqueuenametoid.c,
posix/src/mqueueopen.c, posix/src/mqueueunlink.c,
posix/src/mutexinit.c, posix/src/pbarrierinit.c,
posix/src/prwlockinit.c, posix/src/pspininit.c,
posix/src/pthreadcreate.c, posix/src/pthreadexit.c,
posix/src/semaphorecreatesupp.c, posix/src/semaphorenametoid.c,
posix/src/timercreate.c, rtems/src/barrierident.c,
rtems/src/dpmemident.c, rtems/src/msgqident.c, rtems/src/partident.c,
rtems/src/ratemonident.c, rtems/src/regionident.c,
rtems/src/semident.c, rtems/src/taskident.c, rtems/src/timerident.c,
sapi/src/extensionident.c, score/Makefile.am,
score/include/rtems/score/object.h,
score/inline/rtems/score/object.inl, score/src/apimutexallocate.c,
score/src/objectextendinformation.c,
score/src/objectgetnameasstring.c, score/src/objectmp.c,
score/src/objectnametoid.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.
* score/src/objectclearname.c, score/src/objectcomparenameraw.c,
score/src/objectcomparenamestring.c, score/src/objectcopynameraw.c,
score/src/objectcopynamestring.c: Removed.
Diffstat (limited to 'cpukit/libmisc')
-rw-r--r-- | cpukit/libmisc/capture/capture-cli.c | 4 | ||||
-rw-r--r-- | cpukit/libmisc/capture/capture.c | 16 | ||||
-rw-r--r-- | cpukit/libmisc/monitor/mon-manager.c | 5 | ||||
-rw-r--r-- | cpukit/libmisc/stackchk/check.c | 2 |
4 files changed, 12 insertions, 15 deletions
diff --git a/cpukit/libmisc/capture/capture-cli.c b/cpukit/libmisc/capture/capture-cli.c index 42480df76b..d65bdb8dc5 100644 --- a/cpukit/libmisc/capture/capture-cli.c +++ b/cpukit/libmisc/capture/capture-cli.c @@ -659,12 +659,10 @@ rtems_capture_cli_get_name_id (char* arg, * @warning The extra assigns play with the byte order so do not * remove unless the score has been updated. */ - Objects_Name object_name; rtems_name rname; rname = rtems_build_name(arg[0], arg[1], arg[2], arg[3]); - object_name = (Objects_Name) rname; - *name = (rtems_name) object_name; + *name = rname; *valid_name = 1; } diff --git a/cpukit/libmisc/capture/capture.c b/cpukit/libmisc/capture/capture.c index e8c6396490..45bae26d95 100644 --- a/cpukit/libmisc/capture/capture.c +++ b/cpukit/libmisc/capture/capture.c @@ -412,13 +412,15 @@ rtems_capture_create_capture_task (rtems_tcb* new_task) /* * Check the type of name the object has. */ - if (_Objects_Get_API (new_task->Object.id) == OBJECTS_CLASSIC_API) - name = (rtems_name) new_task->Object.name; - else - name = rtems_build_name (((char*) new_task->Object.name)[0], - ((char*) new_task->Object.name)[1], - ((char*) new_task->Object.name)[2], - ((char*) new_task->Object.name)[3]); + + name = 0; + if ( _Objects_Get_API (new_task->Object.id) == OBJECTS_CLASSIC_API ) + name = new_task->Object.name.name_u32; + else if (new_task->Object.name.name_p) + name = rtems_build_name (new_task->Object.name.name_p[0], + new_task->Object.name.name_p[1], + new_task->Object.name.name_p[2], + new_task->Object.name.name_p[3]); rtems_capture_dup_name (&task->name, name); diff --git a/cpukit/libmisc/monitor/mon-manager.c b/cpukit/libmisc/monitor/mon-manager.c index b91de9b545..9e71addfae 100644 --- a/cpukit/libmisc/monitor/mon-manager.c +++ b/cpukit/libmisc/monitor/mon-manager.c @@ -45,10 +45,7 @@ rtems_monitor_manager_next( { copy = (rtems_monitor_generic_t *) canonical; copy->id = object->id; - if (table->is_string) - _Objects_Copy_name_raw(object->name, ©->name, sizeof(copy->name)); - else - _Objects_Copy_name_raw(&object->name, ©->name, sizeof(copy->name)); + copy->name = object->name.name_u32; } #if defined(RTEMS_MULTIPROCESSING) diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c index a52928e1fc..c3e81f59ca 100644 --- a/cpukit/libmisc/stackchk/check.c +++ b/cpukit/libmisc/stackchk/check.c @@ -217,7 +217,7 @@ void Stack_check_report_blown_task( "id=0x%08" PRIx32 "; name=0x%08" PRIx32, running, running->Object.id, - (uint32_t) running->Object.name + running->Object.name.name_u32 ); #if defined(RTEMS_MULTIPROCESSING) |