diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-11-20 19:19:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-11-20 19:19:16 +0000 |
commit | c4c540124a2de4fb6e5c7cdf658871a3c9ce52d3 (patch) | |
tree | 9253c571c2754139dd2d08d7bc69d1b3516a5d5e /cpukit | |
parent | 2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-c4c540124a2de4fb6e5c7cdf658871a3c9ce52d3.tar.bz2 |
2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1306/cpukit
* posix/inline/rtems/posix/priority.inl: Eliminate hard coded numbers
in favor of existing macros.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/posix/inline/rtems/posix/priority.inl | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index c7ca4d7fa4..25ad102034 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,11 @@ 2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com> + PR 1306/cpukit + * posix/inline/rtems/posix/priority.inl: Eliminate hard coded numbers + in favor of existing macros. + +2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com> + * posix/Makefile.am: Add dummy vfork() implementation. * posix/src/vfork.c: New file. diff --git a/cpukit/posix/inline/rtems/posix/priority.inl b/cpukit/posix/inline/rtems/posix/priority.inl index efabbda65a..74287bd9f3 100644 --- a/cpukit/posix/inline/rtems/posix/priority.inl +++ b/cpukit/posix/inline/rtems/posix/priority.inl @@ -32,21 +32,23 @@ RTEMS_INLINE_ROUTINE bool _POSIX_Priority_Is_valid( int priority ) { - return (priority >= 1 && priority <= 254); + return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) && + (priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY)); + } RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { - return (Priority_Control) (255 - priority); + return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); } RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority ) { - return 255 - priority; + return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); } #endif |