summaryrefslogtreecommitdiff
path: root/cpukit/include/rtems/rtems/tasks.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-24 14:06:41 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-03 07:10:55 +0100
commit180201094e4237679bd27df1e36b4f72d6840870 (patch)
treeb36e74251c273ac6202376b3715a304864422b05 /cpukit/include/rtems/rtems/tasks.h
parent38736c69f84a07838dc18f7357ce5f14e555c860 (diff)
rtems: Add rtems_scheduler_map_priority_from_posix()
Update #3881.
Diffstat (limited to 'cpukit/include/rtems/rtems/tasks.h')
-rw-r--r--cpukit/include/rtems/rtems/tasks.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/include/rtems/rtems/tasks.h b/cpukit/include/rtems/rtems/tasks.h
index f92a2b2ad6..3519bbf795 100644
--- a/cpukit/include/rtems/rtems/tasks.h
+++ b/cpukit/include/rtems/rtems/tasks.h
@@ -754,6 +754,24 @@ rtems_status_code rtems_scheduler_map_priority_to_posix(
int *posix_priority
);
+/**
+ * @brief Map a POSIX thread priority to the corresponding task priority.
+ *
+ * @param scheduler_id Identifier of the scheduler instance.
+ * @param posix_priority The POSIX thread priority to map.
+ * @param[out] priority Pointer to a task priority value.
+ *
+ * @retval RTEMS_SUCCESSFUL Successful operation.
+ * @retval RTEMS_INVALID_ADDRESS The @a priority parameter is @c NULL.
+ * @retval RTEMS_INVALID_ID Invalid scheduler instance identifier.
+ * @retval RTEMS_INVALID_PRIORITY Invalid POSIX thread priority.
+ */
+rtems_status_code rtems_scheduler_map_priority_from_posix(
+ rtems_id scheduler_id,
+ int posix_priority,
+ rtems_task_priority *priority
+);
+
/**@}*/
#ifdef __cplusplus