diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 4a5f940a37..43424c04c0 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2008-01-09 Jennifer Averett + + * posix/src/keycreate.c, rtems/src/eventseize.c, + score/include/rtems/score/interr.h: Rearranged source to allow more + test coverage. + 2008-01-09 Joel Sherrill * libcsupport/src/__assert.c: Clean up and make __assert() call diff --git a/cpukit/posix/src/keycreate.c b/cpukit/posix/src/keycreate.c index be393f8630..faf2a75a35 100644 --- a/cpukit/posix/src/keycreate.c +++ b/cpukit/posix/src/keycreate.c @@ -60,8 +60,19 @@ int pthread_key_create( the_api <= OBJECTS_APIS_LAST; the_api++ ) { - if ( _Objects_Information_table[ the_api ] && - _Objects_Information_table[ the_api ][ 1 ] ) { + if ( _Objects_Information_table[ the_api ] ) { + #if defined(RTEMS_DEBUG) + /* + * Currently all managers are installed if the API is installed. + * This would be a horrible implementation error. + */ + if (_Objects_Information_table[ the_api ][ 1 ] == NULL ) + _Internal_error_Occurred( + INTERNAL_ERROR_CORE, + TRUE, + INTERNAL_ERROR_IMPLEMENTATION + ); + #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c index 1d96811564..d9e0797747 100644 --- a/cpukit/rtems/src/eventseize.c +++ b/cpukit/rtems/src/eventseize.c @@ -117,17 +117,17 @@ void _Event_Seize( * This cannot happen. It indicates that this routine did not * enter the synchronization states above. */ - return; + break; case EVENT_SYNC_NOTHING_HAPPENED: _ISR_Enable( level ); - return; + break; case EVENT_SYNC_TIMEOUT: executing->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); _Thread_Unblock( executing ); - return; + break; case EVENT_SYNC_SATISFIED: if ( _Watchdog_Is_active( &executing->Timer ) ) { @@ -137,6 +137,6 @@ void _Event_Seize( } else _ISR_Enable( level ); _Thread_Unblock( executing ); - return; + break; } } diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h index d41d9cdb58..323bc06818 100644 --- a/cpukit/score/include/rtems/score/interr.h +++ b/cpukit/score/include/rtems/score/interr.h @@ -62,7 +62,8 @@ typedef enum { INTERNAL_ERROR_OUT_OF_PROXIES, INTERNAL_ERROR_INVALID_GLOBAL_ID, INTERNAL_ERROR_BAD_STACK_HOOK, - INTERNAL_ERROR_BAD_ATTRIBUTES + INTERNAL_ERROR_BAD_ATTRIBUTES, + INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY } Internal_errors_Core_list; /**