diff options
Diffstat (limited to 'cpukit/posix/src/sched_getprioritymax.c')
-rw-r--r-- | cpukit/posix/src/sched_getprioritymax.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cpukit/posix/src/sched_getprioritymax.c b/cpukit/posix/src/sched_getprioritymax.c index 94114e3b84..5903f25d59 100644 --- a/cpukit/posix/src/sched_getprioritymax.c +++ b/cpukit/posix/src/sched_getprioritymax.c @@ -21,10 +21,9 @@ #endif #include <sched.h> -#include <errno.h> -#include <rtems/system.h> #include <rtems/seterr.h> +#include <rtems/posix/priorityimpl.h> #include <rtems/score/schedulerimpl.h> int sched_get_priority_max( @@ -45,10 +44,5 @@ int sched_get_priority_max( } scheduler = _Scheduler_Get_own( _Thread_Get_executing() ); - - if ( scheduler->maximum_priority > INT_MAX ) { - return INT_MAX; - } - - return (int) scheduler->maximum_priority - 1; + return _POSIX_Priority_Get_maximum( scheduler ); } |