diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-15 16:31:33 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 14:00:28 +0200 |
commit | 1a4eac500c9a2942f4aff7e27ccdfae3b99c4cb9 (patch) | |
tree | f43e5044a2b719a8cfc04cf58a5a31d620bd9eca /cpukit/posix/include/rtems | |
parent | posix: Make POSIX API aware of scheduler instances (diff) | |
download | rtems-1a4eac500c9a2942f4aff7e27ccdfae3b99c4cb9.tar.bz2 |
posix: Generalize _POSIX_Priority_To_core()
Move POSIX API priority validation into _POSIX_Priority_To_core().
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/include/rtems/posix/priorityimpl.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/cpukit/posix/include/rtems/posix/priorityimpl.h b/cpukit/posix/include/rtems/posix/priorityimpl.h index d06b600f04..ae2e763fba 100644 --- a/cpukit/posix/include/rtems/posix/priorityimpl.h +++ b/cpukit/posix/include/rtems/posix/priorityimpl.h @@ -51,7 +51,8 @@ extern "C" { int _POSIX_Priority_Get_maximum( const Scheduler_Control *scheduler ); /** - * @brief Check if POSIX priority is valid. + * @brief Converts the POSIX API priority to the corresponding SuperCore + * priority and validates it. * * According to POSIX, numerically higher values represent higher priorities. * Thus, SuperCore has priorities run in the opposite sense of the POSIX API. @@ -65,14 +66,17 @@ int _POSIX_Priority_Get_maximum( const Scheduler_Control *scheduler ); * having N priorities. * * @param[in] scheduler The scheduler instance. - * @param[in] priority The POSIX API priority to test. + * @param[in] priority The POSIX API priority to convert and validate. + * @param[out] valid Indicates if the POSIX API priority is valid and a + * corresponding SuperCore priority in the specified scheduler instance + * exists. * - * @retval true The priority is valid. - * @retval false Otherwise. + * @return The corresponding SuperCore priority. */ -bool _POSIX_Priority_Is_valid( +Priority_Control _POSIX_Priority_To_core( const Scheduler_Control *scheduler, - int priority + int priority, + bool *valid ); /** |