From c37c01ec99878fa42a21d2eb66620d168f6ad82a Mon Sep 17 00:00:00 2001 From: Hyotaek Shim Date: Tue, 19 Apr 2022 19:56:50 +0900 Subject: [PATCH] Add resource_get_cpu_sched_boosting_level() API Change-Id: I784131f24d514542d5037acc9fb9842ed9f00099 Signed-off-by: Hyotaek Shim --- include/cpu-boosting.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/include/cpu-boosting.h b/include/cpu-boosting.h index d6ce97c..fa247dc 100644 --- a/include/cpu-boosting.h +++ b/include/cpu-boosting.h @@ -40,7 +40,7 @@ typedef struct resource_pid_info { } resource_pid_t; /** - * @brief Start boosting cpu scheduler for designated pid/tids. + * @brief Start boosting cpu scheduler for the target process (pid/tids). * * @param[in] target_pid The target process pid/tids \n The caller process itself if target_pid.pid is 0 @@ -49,16 +49,26 @@ typedef struct resource_pid_info { * * @return 0 on success, otherwise a negative error value. */ -int resource_start_boosting_cpu_sched (resource_pid_t target_pid, cpu_boosting_level_e level, int timeout_msec); +int resource_start_cpu_sched_boosting (resource_pid_t target_pid, cpu_boosting_level_e level, int timeout_msec); /** - * @brief Stop boosting cpu scheduler for designated pid/tids. + * @brief Stop boosting cpu scheduler for the target process (pid/tids). * * @param[in] target_pid The target process (pid/tids) \n * * @return 0 on success, otherwise a negative error value. */ -int resource_stop_boosting_cpu_sched (resource_pid_t target_pid); +int resource_stop_cpu_sched_boosting (resource_pid_t target_pid); + +/** + * @brief Ask for the cpu scheduler boosting level for the target thread (tid). + * + * @param[in] tid The thread id to check \n + * @param[out] boosting_level The boosting level (cpu_boosting_level_e) \n + * + * @return 0 on success, otherwise a negative error value. + */ +int resource_get_cpu_sched_boosting_level (int tid, cpu_boosting_level_e *boosting_level); /** * @brief Set cpu scheduler inheritance from the source tid to the destination process (pid/tids). -- 2.7.4