Lines Matching refs:rwlock
29 * @brief Declares the rwlock interfaces in C.
40 * @brief Initializes a rwlock.
42 * @param rwlock Indicates a pointer to the rwlock.
43 * @param attr Indicates a pointer to the rwlock attribute.
44 * @return Returns <b>ffrt_thrd_success</b> if the rwlock is initialized;
48 FFRT_C_API int ffrt_rwlock_init(ffrt_rwlock_t* rwlock, const ffrt_rwlockattr_t* attr);
53 * @param rwlock Indicates a pointer to the rwlock.
54 * @return Returns <b>ffrt_thrd_success</b> if the rwlock is locked;
58 FFRT_C_API int ffrt_rwlock_wrlock(ffrt_rwlock_t* rwlock);
63 * @param rwlock Indicates a pointer to the rwlock.
64 * @return Returns <b>ffrt_thrd_success</b> if the rwlock is locked;
68 FFRT_C_API int ffrt_rwlock_trywrlock(ffrt_rwlock_t* rwlock);
73 * @param rwlock Indicates a pointer to the rwlock.
74 * @return Returns <b>ffrt_thrd_success</b> if the rwlock is locked;
78 FFRT_C_API int ffrt_rwlock_rdlock(ffrt_rwlock_t* rwlock);
83 * @param rwlock Indicates a pointer to the rwlock.
84 * @return Returns <b>ffrt_thrd_success</b> if the rwlock is locked;
88 FFRT_C_API int ffrt_rwlock_tryrdlock(ffrt_rwlock_t* rwlock);
91 * @brief Unlocks a rwlock.
93 * @param rwlock Indicates a pointer to the rwlock.
94 * @return Returns <b>ffrt_thrd_success</b> if the rwlock is unlocked;
98 FFRT_C_API int ffrt_rwlock_unlock(ffrt_rwlock_t* rwlock);
101 * @brief Destroys a rwlock.
103 * @param rwlock Indicates a pointer to the rwlock.
104 * @return Returns <b>ffrt_thrd_success</b> if the rwlock is destroyed;
108 FFRT_C_API int ffrt_rwlock_destroy(ffrt_rwlock_t* rwlock);