int (*cpu_boosting_governor_govern_request) (
GHashTable *cpu_boosting_info_table,
cpu_boosting_level_e cpu_boosting_level,
- GSList **cpu_boosting_controller_action)
+ GSList **cpu_boosting_controller_action);
+ bool (*is_cpu_contention_alleviated)
+ (guint timer_id, guint latest_timer_id);
} syscommon_plugin_backend_resourced_cpu_boosting_funcs;
#ifdef __cplusplus
cpu_boosting_level_e cpu_boosting_level,
GSList **cpu_boosting_controller_action);
+/**
+ * @brief Check whehter cpu contention is alleviated
+ * @param[in] timer id when handling cpu boosting level
+ * @param[in] timer id when monitoring the latest stall event
+ * @return @c true when cpu contention is alleviated, otherwise false
+ */
+bool syscommon_plugin_resourced_is_cpu_contention_alleviated(
+ guint timer_id, guint latest_timer_id);
+
#ifdef __cplusplus
}
#endif
return funcs->cpu_boosting_governor_govern_request(cpu_boosting_info_table,
cpu_boosting_level, cpu_boosting_controller_action);
}
+
+EXPORT
+bool syscommon_plugin_resourced_is_cpu_contention_alleviated(
+ guint timer_id, guint latest_timer_id)
+{
+ int ret = 0;
+
+ if (!funcs) {
+ ret = syscommon_plugin_resourced_cpu_boosting_get_backend();
+ if (ret < 0)
+ return ret;
+ }
+
+ assert(funcs);
+ if (!funcs->is_cpu_contention_alleviated) {
+ _E("No \"is_cpu_contention_alleviated\" function");
+ return -ENOTSUP;
+ }
+
+ return funcs->is_cpu_contention_alleviated(timer_id, latest_timer_id);
+}