From 254dc82daf8cbd6922376fcbb81c31e21cbf4d16 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 24 Jun 2016 11:22:03 +0200 Subject: 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. --- cpukit/posix/include/rtems/posix/priorityimpl.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cpukit/posix/include/rtems') 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 +#include #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 -- cgit v1.2.3