summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/posix
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-12 08:31:35 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-16 12:48:37 +0100
commitc9a41b0043e67ed7f1be98f19b5f5fda994ceb55 (patch)
tree20a3eca7fab35a9f4e802d3fe3c01a57c8ca13b1 /cpukit/include/rtems/posix
parentvalidation: Task create/construct (diff)
downloadrtems-c9a41b0043e67ed7f1be98f19b5f5fda994ceb55.tar.bz2
score: Add Thread_Configuration::cpu_time_budget
Move the CPU time budget to the thread configuration. This simplifies _Thread_Initialize().
Diffstat (limited to 'cpukit/include/rtems/posix')
-rw-r--r--cpukit/include/rtems/posix/pthreadimpl.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/cpukit/include/rtems/posix/pthreadimpl.h b/cpukit/include/rtems/posix/pthreadimpl.h
index 52d462ab6f..723b20e8d2 100644
--- a/cpukit/include/rtems/posix/pthreadimpl.h
+++ b/cpukit/include/rtems/posix/pthreadimpl.h
@@ -77,24 +77,24 @@ int _POSIX_Thread_Translate_to_sched_policy(
);
/**
- * @brief Translate sched_param into SuperCore terms.
+ * @brief Translates the POSIX scheduling policy and parameters to parts of the
+ * thread configuration.
*
- * This method translates the POSIX API sched_param into the corresponding
- * SuperCore settings.
+ * @param policy is the POSIX scheduling policy.
*
- * @param[in] policy is the POSIX scheduling policy
- * @param[in] param points to the scheduling parameter structure
- * @param[in] budget_algorithm points to the output CPU Budget algorithm
- * @param[in] budget_callout points to the output CPU Callout
+ * @param param is the pointer to the POSIX scheduling parameters.
*
- * @retval 0 Indicates success.
- * @retval error_code POSIX error code indicating failure.
+ * @param[out] config is the pointer to a thread configuration to set the
+ * budget algorithm, callout, and CPU time budget.
+ *
+ * @retval 0 The operation was successful.
+ *
+ * @retval EINVAL The POSIX scheduling policy or parameters were invalid.
*/
int _POSIX_Thread_Translate_sched_param(
- int policy,
- const struct sched_param *param,
- Thread_CPU_budget_algorithms *budget_algorithm,
- Thread_CPU_budget_algorithm_callout *budget_callout
+ int policy,
+ const struct sched_param *param,
+ Thread_Configuration *config
);
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate(void)