}
API int resource_set_cpu_boosting (resource_pid_t pid,
- cpu_boosting_level_e level, cpu_boosting_flag_e flag, int timeout_msec)
+ cpu_boosting_level_e level, cpu_boosting_flag_e flags, int timeout_msec)
{
int ret;
- int (*func)(resource_pid_t pid, cpu_boosting_level_e level, cpu_boosting_flag_e flag, int timeout_msec) = NULL;
+ int (*func)(resource_pid_t pid, cpu_boosting_level_e level, cpu_boosting_flag_e flags, int timeout_msec) = NULL;
ret = open_cpu_boosting_plugin();
if (ret != RESOURCE_ERROR_NONE)
return RESOURCE_ERROR_NOT_SUPPORTED;
}
- ret = func(pid, level, flag, timeout_msec);
+ ret = func(pid, level, flags, timeout_msec);
if (ret != RESOURCE_ERROR_NONE)
_E("[CPU-BOOSTING] Failed to set CPU boosting");
else
}
API int resource_set_cpu_boosting (resource_pid_t pid,
- cpu_boosting_level_e level, cpu_boosting_flag_e flag, int timeout_msec)
+ cpu_boosting_level_e level, cpu_boosting_flag_e flags, int timeout_msec)
{
int ret;
int sock;
input.command = CPU_BOOSTING_COMMAND_SET;
input.pid = pid;
input.level = level;
- input.flag = flag;
+ input.flags = flags;
input.timeout_msec = timeout_msec;
ret = resource_cpu_boosting_send_command(input, sock);
pthread_exit(NULL);
}
-static void test_set_cpu_boosting(resource_pid_t pid, cpu_boosting_level_e level, cpu_boosting_flag_e flag, int timeout_msec)
+static void test_set_cpu_boosting(resource_pid_t pid, cpu_boosting_level_e level, cpu_boosting_flag_e flags, int timeout_msec)
{
int ret;
- ret = resource_set_cpu_boosting(pid, level, flag, timeout_msec);
+ ret = resource_set_cpu_boosting(pid, level, flags, timeout_msec);
if (ret) {
_E("[CPU-BOOSTING-TEST] error = %d", ret);
}
}
}
-static void test_cpu_boosting(resource_pid_t pid, cpu_boosting_flag_e flag)
+static void test_cpu_boosting(resource_pid_t pid, cpu_boosting_flag_e flags)
{
cpu_boosting_level_info_t cur_level;
for (int level = CPU_BOOSTING_LEVEL_WEAK; level > CPU_BOOSTING_LEVEL_NONE; level--)
- test_set_cpu_boosting(pid, level, flag, 3000);
+ test_set_cpu_boosting(pid, level, flags, 3000);
- if (flag & CPU_BOOSTING_RESET_ON_FORK) {
+ if (flags & CPU_BOOSTING_RESET_ON_FORK) {
pthread_t thread;
int ret = pthread_create(&thread, NULL, thread_attr_check, NULL);
if (ret == 0) {
test_get_cpu_boosting(pid, &cur_level, false); /* Expect CPU_BOOSTING_LEVEL_NONE */
}
-static void one_process_one_thread_test(cpu_boosting_flag_e flag)
+static void one_process_one_thread_test(cpu_boosting_flag_e flags)
{
resource_pid_t pid;
pid.tid = NULL;
pid.tid_count = 0;
- test_cpu_boosting(pid, flag);
+ test_cpu_boosting(pid, flags);
}
static void multi_process_one_thread_test(int pid_count)