diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-06-24 06:38:52 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-06-24 06:38:52 +0000 |
commit | 2212a2adf9f760bd01ebaed18664569a302adc9b (patch) | |
tree | 22e0bc1c0f38ded2fc2093369d7b90dc9fafa6ff /cpukit/posix/include/rtems/posix/priority.h | |
parent | 2009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-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 '')
-rw-r--r-- | cpukit/posix/include/rtems/posix/priority.h | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/cpukit/posix/include/rtems/posix/priority.h b/cpukit/posix/include/rtems/posix/priority.h index 2111bd3118..8e5fb02634 100644 --- a/cpukit/posix/include/rtems/posix/priority.h +++ b/cpukit/posix/include/rtems/posix/priority.h @@ -3,7 +3,7 @@ */ /* - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -18,7 +18,7 @@ #include <rtems/score/priority.h> -/* +/** * 1003.1b-1993,2.2.2.80 definition of priority, p. 19 * * "Numerically higher values represent higher priorities." @@ -34,19 +34,54 @@ * But since RTEMS can be configured with fewer than 256 priorities, * we use the internal constant. */ - #define POSIX_SCHEDULER_MAXIMUM_PRIORITY (PRIORITY_MAXIMUM - 1) + +/** + * This is the numerically least important POSIX priority. + */ #define POSIX_SCHEDULER_MINIMUM_PRIORITY (1) -RTEMS_INLINE_ROUTINE bool _POSIX_Priority_Is_valid( +/** + * 1003.1b-1993,2.2.2.80 definition of priority, p. 19 + * + * "Numerically higher values represent higher priorities." + * + * Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API. + * + * @param[in] priority is the priority to test + * + * @return This method returns true if the priority is valid and + * false otherwise. + */ +bool _POSIX_Priority_Is_valid( int priority ); +/** + * @brief Convert POSIX Priority To SuperCore Priority + * + * This method converts a POSIX API priority into onto the corresponding + * SuperCore value. + * + * @param[in] priority is the POSIX API priority. + * + * @return This method returns the corresponding SuperCore priority. + */ RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ); +/** + * @brief Convert SuperCore Priority To POSIX Priority + * + * This method converts a SuperCore priority into onto the corresponding + * POSIX API value. + * + * @param[in] priority is the POSIX API priority. + * + * @return This method returns the corresponding POSIX priority. + */ RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ); |