summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/tasks.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-09-08 15:32:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-09-21 08:59:33 +0200
commit8123cae864579219e5003a67b451ca4cc07d998b (patch)
treee50feb997422afc2d20af9cd730d43d5896e0e5c /cpukit/rtems/include/rtems/rtems/tasks.h
parentsmptests/smpmutex01: Use test case functions (diff)
downloadrtems-8123cae864579219e5003a67b451ca4cc07d998b.tar.bz2
rtems: Add rtems_task_get_priority()
Update #2556. Update #2784.
Diffstat (limited to '')
-rw-r--r--cpukit/rtems/include/rtems/rtems/tasks.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index e690e60557..0eaaeca4a3 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -320,6 +320,35 @@ rtems_status_code rtems_task_set_priority(
);
/**
+ * @brief Gets the current priority of the specified task with respect to the
+ * specified scheduler instance.
+ *
+ * The current priority reflects temporary priority adjustments due to locking
+ * protocols, the rate-monotonic period objects on some schedulers and other
+ * mechanisms.
+ *
+ * @param[in] task_id Identifier of the task. Use @ref RTEMS_SELF to select
+ * the executing task.
+ * @param[in] scheduler_id Identifier of the scheduler instance.
+ * @param[out] priority Returns the current priority of the specified task with
+ * respect to the specified scheduler instance.
+ *
+ * @retval RTEMS_SUCCESSFUL Successful operation.
+ * @retval RTEMS_ILLEGAL_ON_REMOTE_OBJECT Directive is illegal on remote tasks.
+ * @retval RTEMS_INVALID_ADDRESS The priority parameter is @c NULL.
+ * @retval RTEMS_INVALID_ID Invalid task or scheduler identifier.
+ * @retval RTEMS_NOT_DEFINED The task has no priority within the specified
+ * scheduler instance. This error is only possible on SMP configurations.
+ *
+ * @see rtems_scheduler_ident().
+ */
+rtems_status_code rtems_task_get_priority(
+ rtems_id task_id,
+ rtems_id scheduler_id,
+ rtems_task_priority *priority
+);
+
+/**
* @brief RTEMS Start Task
*
* RTEMS Task Manager