From 27270b0d6c1ec6ff7bca2ffc5a8c25b45d260165 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 9 Apr 2014 10:09:39 +0200 Subject: rtems: Add task get/set scheduler --- cpukit/rtems/include/rtems/rtems/tasks.h | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'cpukit/rtems/include/rtems/rtems/tasks.h') diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h index 21c0166981..9101d9c063 100644 --- a/cpukit/rtems/include/rtems/rtems/tasks.h +++ b/cpukit/rtems/include/rtems/rtems/tasks.h @@ -541,6 +541,41 @@ rtems_status_code rtems_task_set_affinity( ); #endif +/** + * @brief Gets the scheduler of a task. + * + * @param[in] id Identifier of the task. Use @ref RTEMS_SELF to select the + * executing task. + * @param[out] scheduler_id Identifier of the scheduler. + * + * @retval RTEMS_SUCCESSFUL Successful operation. + * @retval RTEMS_INVALID_ADDRESS The @a scheduler_id parameter is @c NULL. + * @retval RTEMS_INVALID_ID Invalid task identifier. + */ +rtems_status_code rtems_task_get_scheduler( + rtems_id id, + rtems_id *scheduler_id +); + +/** + * @brief Sets the scheduler of a task. + * + * @param[in] id Identifier of the task. Use @ref RTEMS_SELF to select the + * executing task. + * @param[in] scheduler_id Identifier of the scheduler. + * + * @retval RTEMS_SUCCESSFUL Successful operation. + * @retval RTEMS_INVALID_ID Invalid task or scheduler identifier. + * @retval RTEMS_INCORRECT_STATE The task is in the wrong state to perform a + * scheduler change. + * + * @see rtems_scheduler_ident(). + */ +rtems_status_code rtems_task_set_scheduler( + rtems_id id, + rtems_id scheduler_id +); + /** * @brief RTEMS Get Self Task Id * -- cgit v1.2.3