summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-14 17:37:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-14 17:37:12 +0000
commit115fb761dc2b2be70de70c80d2c5c88370bec963 (patch)
treeaf628913c22d9edf44e150c9251455ad74b37d5d /cpukit
parent2007-12-14 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-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')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/posix/src/sleep.c7
-rw-r--r--cpukit/posix/src/usleep.c9
-rw-r--r--cpukit/rtems/src/ratemonreportstatistics.c6
-rw-r--r--cpukit/rtems/src/timerserver.c11
5 files changed, 32 insertions, 7 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index b5fbd2e7ad..855755f582 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2007-12-12 Chris Johns <chrisj@rtems.org>
* libblock/include/rtems/flashdisk.h, libblock/src/flashdisk.c:
diff --git a/cpukit/posix/src/sleep.c b/cpukit/posix/src/sleep.c
index b4670a96ce..961aa4b352 100644
--- a/cpukit/posix/src/sleep.c
+++ b/cpukit/posix/src/sleep.c
@@ -1,6 +1,13 @@
/*
* 3.4.3 Delay Process Execution, P1003.1b-1993, p. 81
*
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
* $Id$
*/
diff --git a/cpukit/posix/src/usleep.c b/cpukit/posix/src/usleep.c
index af09f2cdc8..67abc438a6 100644
--- a/cpukit/posix/src/usleep.c
+++ b/cpukit/posix/src/usleep.c
@@ -1,5 +1,12 @@
/*
- * XXX 3.4.3 Delay Process Execution, P1003.1b-1993, p. 81
+ * 3.4.3 Delay Process Execution, P1003.1b-1993, p. 81
+ *
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
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.