summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/psxpriorityisvalid.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-06-24 06:38:52 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-06-24 06:38:52 +0000
commit2212a2adf9f760bd01ebaed18664569a302adc9b (patch)
tree22e0bc1c0f38ded2fc2093369d7b90dc9fafa6ff /cpukit/posix/src/psxpriorityisvalid.c
parent2009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-2212a2adf9f760bd01ebaed18664569a302adc9b.tar.bz2
2009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/Makefile.am, posix/include/rtems/posix/priority.h, posix/include/rtems/posix/pthread.h, posix/inline/rtems/posix/priority.inl, posix/src/killinfo.c, posix/src/pthread.c, posix/src/pthreadcreate.c, posix/src/pthreadsetschedparam.c: Various modifications to improve binary code coverage analysis. Some of these are to mark code as debug only. Some are to break conditional expressions into multiple lines. Some are to move inline methods that are not time critical into subroutines to make them easier to test. Inlining them multiple times means that their logic paths are spread across multiple methods. This explodes the test cases required. * posix/src/psxpriorityisvalid.c, posix/src/psxtransschedparam.c: New files.
Diffstat (limited to 'cpukit/posix/src/psxpriorityisvalid.c')
-rw-r--r--cpukit/posix/src/psxpriorityisvalid.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/cpukit/posix/src/psxpriorityisvalid.c b/cpukit/posix/src/psxpriorityisvalid.c
new file mode 100644
index 0000000000..4b35a81e62
--- /dev/null
+++ b/cpukit/posix/src/psxpriorityisvalid.c
@@ -0,0 +1,27 @@
+/*
+ * COPYRIGHT (c) 1989-2008.
+ * 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$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/posix/priority.h>
+
+bool _POSIX_Priority_Is_valid(
+ int priority
+)
+{
+ return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) &&
+ (priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY));
+
+}
+