From: Unsung Lee Date: Wed, 4 Jun 2025 04:26:54 +0000 (+0900) Subject: Change CPU_BOOSTING_FORCE_RESET_ON_CLEAR to CPU_BOOSTING_FORCE_RESET_ON_SET X-Git-Tag: accepted/tizen/9.0/unified/20250611.103241^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_9.0_unified;p=platform%2Fcore%2Fapi%2Fresource.git Change CPU_BOOSTING_FORCE_RESET_ON_CLEAR to CPU_BOOSTING_FORCE_RESET_ON_SET Change CPU_BOOSTING_FORCE_RESET_ON_CLEAR to CPU_BOOSTING_FORCE_RESET_ON_SET to reset CPU boosting on set instead of clear. Change-Id: I2a01d8b821c255b0ca9ac3c4f268d0380f893093 Signed-off-by: Unsung Lee --- diff --git a/include/cpu-boosting-type.h b/include/cpu-boosting-type.h index 2035b0c..2d7afe5 100644 --- a/include/cpu-boosting-type.h +++ b/include/cpu-boosting-type.h @@ -50,7 +50,7 @@ typedef enum { */ typedef enum resource_cpu_boosting_flag { CPU_BOOSTING_RESET_ON_FORK = 0x01, /**< CPU RESET ON FORK */ - CPU_BOOSTING_FORCE_RESET_ON_CLEAR = 0x02, /**< CPU FORCE RESET ON CLEAR */ + CPU_BOOSTING_FORCE_RESET_ON_SET = 0x02, /**< CPU FORCE RESET ON SET */ } cpu_boosting_flag_e; /** diff --git a/include/cpu-boosting.h b/include/cpu-boosting.h index 1c80dc1..333f3b9 100644 --- a/include/cpu-boosting.h +++ b/include/cpu-boosting.h @@ -50,8 +50,8 @@ extern "C" { * @param[in] flags The cpu boosting flag bits * If #CPU_BOOSTING_RESET_ON_FORK is set, child processes or threads created by fork() or pthread_create() * do not inherit boosted CPU schedulder and priority from the parent. - * If #CPU_BOOSTING_FORCE_RESET_ON_CLEAR is set, - * reset CPU boosting forcely on resource_clear_cpu_boosting() regardless of duplicate CPU boosting sets. + * If #CPU_BOOSTING_FORCE_RESET_ON_SET is set, + * reset CPU boosting forcely on resource_set_cpu_boosting() regardless of duplicate CPU boosting sets. * @param[in] timeout_msec The timeout in milliseconds, -1 to apply boosting permanently * * @return 0 on success, otherwise a negative error value. diff --git a/tests/main.c b/tests/main.c index 5c549a6..a076332 100644 --- a/tests/main.c +++ b/tests/main.c @@ -261,10 +261,9 @@ static int test_multi_process_one_thread_force_reset(int pid_count, cpu_boosting /** * Parent process forcely resets CPU boosting level as CPU_BOOSTING_LEVEL_NONE, - * when CPU_BOOSTING_FORCE_RESET_ON_CLEAR is set. + * when CPU_BOOSTING_FORCE_RESET_ON_SET is set. */ test_set_cpu_boosting(resource_pid, CPU_BOOSTING_LEVEL_NONE, flags, -1); - test_clear_cpu_boosting(resource_pid); ret = resource_get_cpu_boosting_level(resource_pid, &level); if (ret < 0) { _E("Failed to get cpu boosting level: ret (%d)", ret); @@ -368,9 +367,9 @@ int main (void) /* Case 2: Boosting single-threaded processes */ _D("[CPU-BOOSTING-TEST] <<<<<<<<<< Multi Processes One Thread >>>>>>>>>>"); multi_process_one_thread_test(7); - ret = test_multi_process_one_thread_force_reset(7, CPU_BOOSTING_FORCE_RESET_ON_CLEAR); + ret = test_multi_process_one_thread_force_reset(7, CPU_BOOSTING_FORCE_RESET_ON_SET); if (ret < 0) { - _E("Failed to test multi process with CPU_BOOSTING_FORCE_RESET_ON_CLEAR: ret (%d)", ret); + _E("Failed to test multi process with CPU_BOOSTING_FORCE_RESET_ON_SET: ret (%d)", ret); return 1; }