diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-14 17:37:12 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-14 17:37:12 +0000 |
commit | 115fb761dc2b2be70de70c80d2c5c88370bec963 (patch) | |
tree | af628913c22d9edf44e150c9251455ad74b37d5d /cpukit/rtems | |
parent | 2007-12-14 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-115fb761dc2b2be70de70c80d2c5c88370bec963.tar.bz2 |
2007-12-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/sleep.c, posix/src/usleep.c: Add copyright header.
* rtems/src/ratemonreportstatistics.c, rtems/src/timerserver.c:
Minor cleanup to improve testability and eliminate dead code.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r-- | cpukit/rtems/src/ratemonreportstatistics.c | 6 | ||||
-rw-r--r-- | cpukit/rtems/src/timerserver.c | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/cpukit/rtems/src/ratemonreportstatistics.c b/cpukit/rtems/src/ratemonreportstatistics.c index b26fce55ad..e8949f4b5e 100644 --- a/cpukit/rtems/src/ratemonreportstatistics.c +++ b/cpukit/rtems/src/ratemonreportstatistics.c @@ -114,8 +114,10 @@ ididididid NNNN ccccc mmmmmm X /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); - if ( status != RTEMS_SUCCESSFUL ) - continue; + #if defined(RTEMS_DEBUG) + if ( status != RTEMS_SUCCESSFUL ) + continue; + #endif name[ 0 ] = '\0'; diff --git a/cpukit/rtems/src/timerserver.c b/cpukit/rtems/src/timerserver.c index af6910bd5a..01bb597f1c 100644 --- a/cpukit/rtems/src/timerserver.c +++ b/cpukit/rtems/src/timerserver.c @@ -149,14 +149,17 @@ rtems_status_code rtems_timer_initiate_server( rtems_task_priority _priority; /* - * Make sure the requested priority is valid. + * Make sure the requested priority is valid. The if is + * structured so we check it is invalid before looking for + * a specific invalid value as the default. */ _priority = priority; - if ( priority == RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) + if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { + if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) + return RTEMS_INVALID_PRIORITY; _priority = 0; - else if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) - return RTEMS_INVALID_PRIORITY; + } /* * Just to make sure the test versus create/start operation are atomic. |