From 77adff622fa16c0db5e5842f1a8b4a043e3729fe Mon Sep 17 00:00:00 2001 From: Hyotaek Shim Date: Mon, 13 Jun 2022 12:33:19 +0900 Subject: [PATCH] Refine the description of cpu boosting APIs Change-Id: I184055440daf2373fcc162c3bb7636f9af499d59 Signed-off-by: Hyotaek Shim (cherry picked from commit e673298debec4bc4ab061adfebb3c17f73ba0630) --- include/cpu-boosting.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/cpu-boosting.h b/include/cpu-boosting.h index abe5a6c..ad6aa37 100644 --- a/include/cpu-boosting.h +++ b/include/cpu-boosting.h @@ -33,9 +33,9 @@ extern "C" { * @brief Set cpu boosting for the target process (pid/tids). * * @param[in] pid The target process pid/tids \n - * If pid.pid is zero and pid.tid is NULL, pid of the calling thread is used. \n - * If pid.pid is zero and pid.tid is not NULL, all tids in the list are used \n * If pid.pid is nonzero, pid.tid and pid.tid_count are ignored. \n + * If pid.pid is zero and pid.tid is not NULL, all tids in the list are used \n + * If pid.pid is zero and pid.tid is NULL, pid of the calling thread is used. \n * The caller must (de)allocate the buffer in the pid.tid pointer. * @param[in] level The cpu boosting level * @param[in] timeout_msec The timeout in milliseconds, -1 to apply boosting permanently @@ -48,9 +48,9 @@ int resource_set_cpu_boosting (resource_pid_t pid, cpu_boosting_level_e level, i * @brief Clear cpu boosting for the target process (pid/tids). * * @param[in] pid The target process pid/tids \n - * If pid.pid is zero and pid.tid is NULL, pid of the calling thread is used. \n - * If pid.pid is zero and pid.tid is not NULL, all tids in the list are used \n * If pid.pid is nonzero, pid.tid and pid.tid_count are ignored. \n + * If pid.pid is zero and pid.tid is not NULL, all tids in the list are used \n + * If pid.pid is zero and pid.tid is NULL, pid of the calling thread is used. \n * The caller must (de)allocate the buffer in the pid.tid pointer. * * @return 0 on success, otherwise a negative error value. @@ -61,8 +61,9 @@ int resource_clear_cpu_boosting (resource_pid_t pid); * @brief Get the cpu boosting level for the target process (pid/tids). * * @param[in] pid The target process pid/tids \n - * If pid.pid is zero and pid.tid is NULL, pid of the calling thread is used. \n * If pid.pid is nonzero, pid.tid and pid.tid_count are ignored. \n + * If pid.pid is zero and pid.tid is not NULL, all tids in the list are used \n + * If pid.pid is zero and pid.tid is NULL, pid of the calling thread is used. \n * The caller must (de)allocate the buffer in the pid.tid pointer. * @param[out] level The boosting level for the target process (pid/tids) \n * The level argument will be filled with the level value corresponding to the pid argument. \n @@ -97,7 +98,11 @@ int resource_clear_cpu_inheritance (int source_tid, const char *dest_process); * @brief Register a destination process (pid/tids) for cpu resource inheritance. * * @param[in] dest_process The name of destination process - * @param[in] pid The destination process pid/tids + * @param[in] pid The destination process pid/tids \n + * If pid.pid is nonzero, pid.tid and pid.tid_count are ignored. \n + * If pid.pid is zero and pid.tid is not NULL, all tids in the list are used \n + * If pid.pid is zero and pid.tid is NULL, pid of the calling thread is used. \n + * The caller must (de)allocate the buffer in the pid.tid pointer. * * @return 0 on success, otherwise a negative error value. */ -- 2.34.1