From 852b9e38fed30698a74e0f0ab6044728a42cab0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=85=E5=BF=97=E5=9D=9A?= Date: Thu, 23 Jan 2025 20:33:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=B4=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=AE=8F=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resourceschedule/ffrt/c/condition_variable.h | 26 ++++++++++---------- resourceschedule/ffrt/c/mutex.h | 20 +++++++-------- resourceschedule/ffrt/c/sleep.h | 4 +-- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/resourceschedule/ffrt/c/condition_variable.h b/resourceschedule/ffrt/c/condition_variable.h index 0c0534246..484ab0c0a 100644 --- a/resourceschedule/ffrt/c/condition_variable.h +++ b/resourceschedule/ffrt/c/condition_variable.h @@ -45,8 +45,8 @@ * * @param cond Indicates a pointer to the condition variable. * @param attr Indicates a pointer to the condition variable attribute. - * @return Returns ffrt_thrd_success if the condition variable is initialized; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the condition variable is initialized; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -57,8 +57,8 @@ FFRT_C_API int ffrt_cond_init(ffrt_cond_t* cond, const ffrt_condattr_t* attr); * @brief Unblocks at least one of the threads that are blocked on a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the thread is unblocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is unblocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -69,8 +69,8 @@ FFRT_C_API int ffrt_cond_signal(ffrt_cond_t* cond); * @brief Unblocks all threads currently blocked on a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the threads are unblocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the threads are unblocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -82,8 +82,8 @@ FFRT_C_API int ffrt_cond_broadcast(ffrt_cond_t* cond); * * @param cond Indicates a pointer to the condition variable. * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the thread is unblocked after being blocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is unblocked after being blocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -98,9 +98,9 @@ FFRT_C_API int ffrt_cond_wait(ffrt_cond_t* cond, ffrt_mutex_t* mutex); * @param time_point Indicates the maximum duration that the thread is blocked. * If ffrt_cond_signal or ffrt_cond_broadcast is not called to unblock the thread * when the maximum duration reaches, the thread is automatically unblocked. - * @return Returns ffrt_thrd_success if the thread is unblocked after being blocked; - returns ffrt_thrd_timedout if the maximum duration reaches; - returns ffrt_thrd_error if the blocking fails. + * @return Returns ffrt_success if the thread is unblocked after being blocked; + returns ffrt_timedout if the maximum duration reaches; + returns ffrt_error if the blocking fails. * @since 10 * @version 1.0 */ @@ -110,8 +110,8 @@ FFRT_C_API int ffrt_cond_timedwait(ffrt_cond_t* cond, ffrt_mutex_t* mutex, const * @brief Destroys a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the condition variable is destroyed; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the condition variable is destroyed; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/mutex.h b/resourceschedule/ffrt/c/mutex.h index c8f28ac0f..1f0e25a32 100644 --- a/resourceschedule/ffrt/c/mutex.h +++ b/resourceschedule/ffrt/c/mutex.h @@ -90,8 +90,8 @@ FFRT_C_API int ffrt_mutexattr_destroy(ffrt_mutexattr_t* attr); * * @param mutex Indicates a pointer to the mutex. * @param attr Indicates a pointer to the mutex attribute. - * @return Returns ffrt_thrd_success if the mutex is initialized; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is initialized; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ @@ -101,8 +101,8 @@ FFRT_C_API int ffrt_mutex_init(ffrt_mutex_t* mutex, const ffrt_mutexattr_t* attr * @brief Locks a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is locked; - returns ffrt_thrd_error or blocks the calling thread otherwise. + * @return Returns ffrt_success if the mutex is locked; + returns ffrt_error or blocks the calling thread otherwise. * @since 10 * @version 1.0 */ @@ -112,8 +112,8 @@ FFRT_C_API int ffrt_mutex_lock(ffrt_mutex_t* mutex); * @brief Unlocks a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is unlocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is unlocked; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ @@ -123,8 +123,8 @@ FFRT_C_API int ffrt_mutex_unlock(ffrt_mutex_t* mutex); * @brief Attempts to lock a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is locked; - returns ffrt_thrd_error or ffrt_thrd_busy otherwise. + * @return Returns ffrt_success if the mutex is locked; + returns ffrt_error or ffrt_busy otherwise. * @since 10 * @version 1.0 */ @@ -134,8 +134,8 @@ FFRT_C_API int ffrt_mutex_trylock(ffrt_mutex_t* mutex); * @brief Destroys a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is destroyed; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is destroyed; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/sleep.h b/resourceschedule/ffrt/c/sleep.h index 777cb553d..d45668ed1 100644 --- a/resourceschedule/ffrt/c/sleep.h +++ b/resourceschedule/ffrt/c/sleep.h @@ -44,8 +44,8 @@ * @brief Suspends the calling thread for a given duration. * * @param usec Indicates the duration that the calling thread is suspended, in microseconds. - * @return Returns ffrt_thrd_success if the thread is suspended; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is suspended; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ -- Gitee From 3bfa1a7c9c803361419e421662abb1bf22baae5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=85=E5=BF=97=E5=9D=9A?= Date: Thu, 23 Jan 2025 20:33:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=B4=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=AE=8F=E5=86=85=E5=AE=B9=20Signed-off-by:=20?= =?UTF-8?q?=E6=A2=85=E5=BF=97=E5=9D=9A=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resourceschedule/ffrt/c/condition_variable.h | 26 ++++++++++---------- resourceschedule/ffrt/c/mutex.h | 20 +++++++-------- resourceschedule/ffrt/c/sleep.h | 4 +-- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/resourceschedule/ffrt/c/condition_variable.h b/resourceschedule/ffrt/c/condition_variable.h index 0c0534246..484ab0c0a 100644 --- a/resourceschedule/ffrt/c/condition_variable.h +++ b/resourceschedule/ffrt/c/condition_variable.h @@ -45,8 +45,8 @@ * * @param cond Indicates a pointer to the condition variable. * @param attr Indicates a pointer to the condition variable attribute. - * @return Returns ffrt_thrd_success if the condition variable is initialized; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the condition variable is initialized; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -57,8 +57,8 @@ FFRT_C_API int ffrt_cond_init(ffrt_cond_t* cond, const ffrt_condattr_t* attr); * @brief Unblocks at least one of the threads that are blocked on a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the thread is unblocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is unblocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -69,8 +69,8 @@ FFRT_C_API int ffrt_cond_signal(ffrt_cond_t* cond); * @brief Unblocks all threads currently blocked on a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the threads are unblocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the threads are unblocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -82,8 +82,8 @@ FFRT_C_API int ffrt_cond_broadcast(ffrt_cond_t* cond); * * @param cond Indicates a pointer to the condition variable. * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the thread is unblocked after being blocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is unblocked after being blocked; + returns ffrt_error otherwise. * @syscap SystemCapability.Resourceschedule.Ffrt.Core * @since 10 * @version 1.0 @@ -98,9 +98,9 @@ FFRT_C_API int ffrt_cond_wait(ffrt_cond_t* cond, ffrt_mutex_t* mutex); * @param time_point Indicates the maximum duration that the thread is blocked. * If ffrt_cond_signal or ffrt_cond_broadcast is not called to unblock the thread * when the maximum duration reaches, the thread is automatically unblocked. - * @return Returns ffrt_thrd_success if the thread is unblocked after being blocked; - returns ffrt_thrd_timedout if the maximum duration reaches; - returns ffrt_thrd_error if the blocking fails. + * @return Returns ffrt_success if the thread is unblocked after being blocked; + returns ffrt_timedout if the maximum duration reaches; + returns ffrt_error if the blocking fails. * @since 10 * @version 1.0 */ @@ -110,8 +110,8 @@ FFRT_C_API int ffrt_cond_timedwait(ffrt_cond_t* cond, ffrt_mutex_t* mutex, const * @brief Destroys a condition variable. * * @param cond Indicates a pointer to the condition variable. - * @return Returns ffrt_thrd_success if the condition variable is destroyed; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the condition variable is destroyed; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/mutex.h b/resourceschedule/ffrt/c/mutex.h index c8f28ac0f..1f0e25a32 100644 --- a/resourceschedule/ffrt/c/mutex.h +++ b/resourceschedule/ffrt/c/mutex.h @@ -90,8 +90,8 @@ FFRT_C_API int ffrt_mutexattr_destroy(ffrt_mutexattr_t* attr); * * @param mutex Indicates a pointer to the mutex. * @param attr Indicates a pointer to the mutex attribute. - * @return Returns ffrt_thrd_success if the mutex is initialized; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is initialized; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ @@ -101,8 +101,8 @@ FFRT_C_API int ffrt_mutex_init(ffrt_mutex_t* mutex, const ffrt_mutexattr_t* attr * @brief Locks a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is locked; - returns ffrt_thrd_error or blocks the calling thread otherwise. + * @return Returns ffrt_success if the mutex is locked; + returns ffrt_error or blocks the calling thread otherwise. * @since 10 * @version 1.0 */ @@ -112,8 +112,8 @@ FFRT_C_API int ffrt_mutex_lock(ffrt_mutex_t* mutex); * @brief Unlocks a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is unlocked; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is unlocked; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ @@ -123,8 +123,8 @@ FFRT_C_API int ffrt_mutex_unlock(ffrt_mutex_t* mutex); * @brief Attempts to lock a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is locked; - returns ffrt_thrd_error or ffrt_thrd_busy otherwise. + * @return Returns ffrt_success if the mutex is locked; + returns ffrt_error or ffrt_busy otherwise. * @since 10 * @version 1.0 */ @@ -134,8 +134,8 @@ FFRT_C_API int ffrt_mutex_trylock(ffrt_mutex_t* mutex); * @brief Destroys a mutex. * * @param mutex Indicates a pointer to the mutex. - * @return Returns ffrt_thrd_success if the mutex is destroyed; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the mutex is destroyed; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ diff --git a/resourceschedule/ffrt/c/sleep.h b/resourceschedule/ffrt/c/sleep.h index 777cb553d..d45668ed1 100644 --- a/resourceschedule/ffrt/c/sleep.h +++ b/resourceschedule/ffrt/c/sleep.h @@ -44,8 +44,8 @@ * @brief Suspends the calling thread for a given duration. * * @param usec Indicates the duration that the calling thread is suspended, in microseconds. - * @return Returns ffrt_thrd_success if the thread is suspended; - returns ffrt_thrd_error otherwise. + * @return Returns ffrt_success if the thread is suspended; + returns ffrt_error otherwise. * @since 10 * @version 1.0 */ -- Gitee