harmony 鸿蒙shared_mutex.h

2025-06-12 浏览 (1)

shared_mutex.h

Overview

The shared_mutex.h file declares read-write lock interfaces in C.

Library: libffrt.z.so

System capability: SystemCapability.Resourceschedule.Ffrt.Core

Since: 18

Related module: FFRT

Summary

Functions

NameDescription
FFRT_C_API int ffrt_rwlock_init (ffrt_rwlock_t *rwlock, const ffrt_rwlockattr_t *attr)Initializes a read-write lock.
FFRT_C_API int ffrt_rwlock_wrlock (ffrt_rwlock_t *rwlock)Obtains a write lock.
FFRT_C_API int ffrt_rwlock_trywrlock (ffrt_rwlock_t *rwlock)Attempts to obtain a write lock; if it fails, the function returns immediately.
FFRT_C_API int ffrt_rwlock_rdlock (ffrt_rwlock_t *rwlock)Obtains a read lock.
FFRT_C_API int ffrt_rwlock_tryrdlock (ffrt_rwlock_t *rwlock)Attempts to obtain a read lock; if it fails, the function returns immediately.
FFRT_C_API int ffrt_rwlock_unlock (ffrt_rwlock_t *rwlock)Releases the read-write lock.
FFRT_C_API int ffrt_rwlock_destroy (ffrt_rwlock_t *rwlock)Destroys the read-write lock.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Function Flow Runtime Kit

harmony 鸿蒙FFRT

harmony 鸿蒙condition_variable.h

harmony 鸿蒙ffrt_cond_t

harmony 鸿蒙ffrt_condattr_t

harmony 鸿蒙ffrt_dependence_t

harmony 鸿蒙ffrt_deps_t

harmony 鸿蒙ffrt_function_header_t

harmony 鸿蒙ffrt_mutex_t

harmony 鸿蒙ffrt_mutexattr_t

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/QwkRyF