From: Hyotaek Shim Date: Tue, 19 Apr 2022 10:56:50 +0000 (+0900) Subject: Add resource_get_cpu_sched_boosting_level() API X-Git-Tag: accepted/tizen/unified/20220420.135413^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c37c01ec99878fa42a21d2eb66620d168f6ad82a;p=platform%2Fcore%2Fapi%2Fresource.git Add resource_get_cpu_sched_boosting_level() API Change-Id: I784131f24d514542d5037acc9fb9842ed9f00099 Signed-off-by: Hyotaek Shim --- 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).