diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-24 11:22:03 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-24 14:44:31 +0200 |
commit | 254dc82daf8cbd6922376fcbb81c31e21cbf4d16 (patch) | |
tree | c58687f860da6543dc05ab14fdf7e8db8f77cfbc /cpukit/posix/include/rtems/posix | |
parent | score: Silence integer conversion warnings (diff) | |
download | rtems-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 '')
-rw-r--r-- | cpukit/posix/include/rtems/posix/priorityimpl.h | 9 |
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 |