Add resource_get_cpu_sched_boosting_level() API 84/273984/1 accepted/tizen/unified/20220420.135413 submit/tizen/20220420.055631
authorHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 19 Apr 2022 10:56:50 +0000 (19:56 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 19 Apr 2022 10:56:50 +0000 (19:56 +0900)
Change-Id: I784131f24d514542d5037acc9fb9842ed9f00099
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
include/cpu-boosting.h

index d6ce97c..fa247dc 100644 (file)
@@ -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).