summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-24 11:22:03 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-24 14:44:31 +0200
commit254dc82daf8cbd6922376fcbb81c31e21cbf4d16 (patch)
treec58687f860da6543dc05ab14fdf7e8db8f77cfbc /cpukit/posix/include/rtems
parentscore: Silence integer conversion warnings (diff)
downloadrtems-254dc82daf8cbd6922376fcbb81c31e21cbf4d16.tar.bz2
score: Change Priority_Control to 64-bit
A 32-bit Priority_Control limits the uptime to 49 days with a 1ms clock tick in case the EDF scheduler is used. Increase it to 64-bit to enable proper operation of the EDF scheduler, Close 2173.
Diffstat (limited to 'cpukit/posix/include/rtems')
-rw-r--r--cpukit/posix/include/rtems/posix/priorityimpl.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/posix/include/rtems/posix/priorityimpl.h b/cpukit/posix/include/rtems/posix/priorityimpl.h
index b986d64cd5..eb2e3e059f 100644
--- a/cpukit/posix/include/rtems/posix/priorityimpl.h
+++ b/cpukit/posix/include/rtems/posix/priorityimpl.h
@@ -20,6 +20,7 @@
#define _RTEMS_POSIX_PRIORITYIMPL_H
#include <rtems/score/scheduler.h>
+#include <rtems/score/assert.h>
#ifdef __cplusplus
extern "C" {
@@ -48,7 +49,13 @@ extern "C" {
*
* @return The maximum POSIX API priority for this scheduler instance.
*/
-int _POSIX_Priority_Get_maximum( const Scheduler_Control *scheduler );
+RTEMS_INLINE_ROUTINE int _POSIX_Priority_Get_maximum(
+ const Scheduler_Control *scheduler
+)
+{
+ _Assert( (int) scheduler->maximum_priority > 1 );
+ return (int) scheduler->maximum_priority - 1;
+}
/**
* @brief Converts the POSIX API priority to the corresponding SuperCore