diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-19 14:15:59 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-22 16:57:23 +0200 |
commit | 97552c98b630294cf9d5efb523e1e15db8df686f (patch) | |
tree | 39a0b46bfff4c9075cc5a562dd3c52a07a889812 /cpukit/posix/include/rtems/posix/priority.h | |
parent | smptests/smp08: Print missing newline (diff) | |
download | rtems-97552c98b630294cf9d5efb523e1e15db8df686f.tar.bz2 |
posix: Create priority implementation header
Move implementation specific parts of priority.h and priority.inl into
new header file priorityimpl.h. Remove priority.h since there is no
application visible API.
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/include/rtems/posix/priorityimpl.h (renamed from cpukit/posix/include/rtems/posix/priority.h) | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/cpukit/posix/include/rtems/posix/priority.h b/cpukit/posix/include/rtems/posix/priorityimpl.h index e9ee2f900b..63bb5e2e80 100644 --- a/cpukit/posix/include/rtems/posix/priority.h +++ b/cpukit/posix/include/rtems/posix/priorityimpl.h @@ -16,8 +16,14 @@ * http://www.rtems.com/license/LICENSE. */ -#ifndef _RTEMS_POSIX_PRIORITY_H -#define _RTEMS_POSIX_PRIORITY_H +#ifndef _RTEMS_POSIX_PRIORITYIMPL_H +#define _RTEMS_POSIX_PRIORITYIMPL_H + +#include <rtems/score/priority.h> + +#ifdef __cplusplus +extern "C" { +#endif /** * @defgroup POSIX_PRIORITY POSIX Priority Support @@ -29,8 +35,6 @@ */ /**@{**/ -#include <rtems/score/priority.h> - /** * 1003.1b-1993,2.2.2.80 definition of priority, p. 19 * @@ -85,7 +89,10 @@ bool _POSIX_Priority_Is_valid( */ RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority -); +) +{ + return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); +} /** * @brief Convert SuperCore priority To POSIX priority. @@ -99,10 +106,15 @@ RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( */ RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( Priority_Control priority -); - -#include <rtems/posix/priority.inl> +) +{ + return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); +} /** @} */ +#ifdef __cplusplus +} +#endif + #endif |