summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/killinfo.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-20 22:39:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-20 22:39:34 +0000
commit60256e86db959f294ec395133a64726515ee1240 (patch)
tree9a7d1319b7b5aeacfc752ffade543529305e47c6 /cpukit/posix/src/killinfo.c
parent2007-12-20 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-60256e86db959f294ec395133a64726515ee1240.tar.bz2
2007-12-20 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/killinfo.c: Clean up and eliminate some dead code paths.
Diffstat (limited to 'cpukit/posix/src/killinfo.c')
-rw-r--r--cpukit/posix/src/killinfo.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
index bd9ce7a459..df5fd62c15 100644
--- a/cpukit/posix/src/killinfo.c
+++ b/cpukit/posix/src/killinfo.c
@@ -89,14 +89,8 @@ int killinfo(
* faults.
*/
- switch ( sig ) {
- case SIGFPE:
- case SIGILL:
- case SIGSEGV:
+ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
- default:
- break;
- }
mask = signo_to_mask( sig );
@@ -172,26 +166,29 @@ int killinfo(
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
- for ( the_api = 2;
+ for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
- if ( the_api == OBJECTS_INTERNAL_THREADS )
- continue;
-
- if ( !_Objects_Information_table[ the_api ] ) /* API not installed */
+ /*
+ * Thie can occur when no one is interested and ITRON is not configured.
+ */
+ if ( !_Objects_Information_table[ the_api ] )
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
- if ( !the_info ) /* manager not installed */
+ /*
+ * This cannot happen in the current (as of Dec 2007) implementation
+ * of initialization but at some point, the object information
+ * structure for a particular manager may not be installed.
+ */
+ if ( !the_info )
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
- assert( object_table ); /* always at least 1 entry */
-
for ( index = 1 ; index <= maximum ; index++ ) {
the_thread = (Thread_Control *) object_table[ index ];