summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/psxpriorityisvalid.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-14 11:45:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-22 14:00:27 +0200
commit2df7fcff883856cd2fa8a56e9c509a0674bfb01a (patch)
treec277f34f4cac80f4a629c4438f51b6dd66102625 /cpukit/posix/src/psxpriorityisvalid.c
parentce6e9ec22f3a4ba976c9de2b7b0fbe646f1b36de (diff)
downloadrtems-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/psxpriorityisvalid.c')
-rw-r--r--cpukit/posix/src/psxpriorityisvalid.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpukit/posix/src/psxpriorityisvalid.c b/cpukit/posix/src/psxpriorityisvalid.c
index 1bc7945136..c883416c86 100644
--- a/cpukit/posix/src/psxpriorityisvalid.c
+++ b/cpukit/posix/src/psxpriorityisvalid.c
@@ -18,9 +18,17 @@
#include "config.h"
#endif
-#include <rtems/system.h>
#include <rtems/posix/priorityimpl.h>
+int _POSIX_Priority_Get_maximum( const Scheduler_Control *scheduler )
+{
+ if ( scheduler->maximum_priority < INT_MAX ) {
+ return (int) scheduler->maximum_priority - 1;
+ } else {
+ return INT_MAX;
+ }
+}
+
bool _POSIX_Priority_Is_valid(
int priority
)