diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-14 11:45:22 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 14:00:27 +0200 |
commit | 2df7fcff883856cd2fa8a56e9c509a0674bfb01a (patch) | |
tree | c277f34f4cac80f4a629c4438f51b6dd66102625 /cpukit/posix/src/sched_getprioritymax.c | |
parent | posix: pthread_mutexattr_setprioceiling() (diff) | |
download | rtems-2df7fcff883856cd2fa8a56e9c509a0674bfb01a.tar.bz2 |
posix: _POSIX_Mutex_Default_attributes
Make _POSIX_Mutex_Default_attributes constant and independent of the
scheduler instance. Use INT_MAX to indicate the default ceiling
priority.
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 ); } |