mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-27 15:00:16 +00:00
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.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user