From 2df7fcff883856cd2fa8a56e9c509a0674bfb01a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 14 Jun 2016 11:45:22 +0200 Subject: 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. --- cpukit/posix/src/sched_getprioritymax.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'cpukit/posix/src/sched_getprioritymax.c') 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 -#include -#include #include +#include #include 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 ); } -- cgit v1.2.3