if (!res || !level)
return;
- /* Add blank line for improving the readability on dlog */
- _D("");
-
if (level->limit_min_freq > 0) {
- _D("MIN Frequency is %10d of '%s' resource \n",
+ _D("MIN Frequency is %10d of '%s' resource \n",
level->limit_min_freq,
res->config_data.res_name);
}
if (level->limit_max_freq > 0) {
- _D("MAX Frequency is %10d of '%s' resource\n",
+ _D("MAX Frequency is %10d of '%s' resource\n",
level->limit_max_freq,
res->config_data.res_name);
}
if (level->limit_min_cpu >= 0) {
- _D("MIN CPU number is %10d of '%s' resource\n",
+ _D("MIN CPU number is %10d of '%s' resource\n",
level->limit_min_cpu,
res->config_data.res_name);
}
if (level->limit_max_cpu >= 0) {
- _D("MAX CPU number is %10d of '%s' resource\n",
+ _D("MAX CPU number is %10d of '%s' resource\n",
level->limit_max_cpu,
res->config_data.res_name);
}
break;
}
- /* no cpu */
if (!elem)
return 0;
- /* unlock cpu */
set_pmqos(cpu->name, false);
- /* delete cpu */
+
pmqos_head = g_list_remove(pmqos_head, (gconstpointer)cpu);
free(cpu);
if (strcmp(unlock_timer_owner.name, name))
goto out;
- /* undata cpu */
+
pmqos_unlock_timeout_update();
pmqos_unlock_timer_start();
out:
int found = 0;
int ret;
- /* find cpu */
for (elem = pmqos_head; elem != NULL; elem = elem->next) {
cpu = elem->data;
if (!strcmp(cpu->name, name)) {
}
}
- /* add cpu */
if (!found) {
cpu = calloc(1, sizeof(struct pmqos_cpu));
if (!cpu)
cpu->timeout = val;
pmqos_head = g_list_append(pmqos_head, (gpointer)cpu);
}
- /* sort cpu */
+
pmqos_head = g_list_sort(pmqos_head, compare_timeout);
ret = pmqos_unlock_timer_start();
if (ret < 0)
goto err;
- /* Set cpu lock */
set_pmqos(cpu->name, true);
return 0;
err: