结构体 | |
struct | OsRwlock |
类型定义 | |
typedef struct OsRwlock | LosRwlock |
函数 | |
UINT32 | LOS_RwlockInit (LosRwlock *rwlock) |
Init a rwlock. 更多... | |
UINT32 | LOS_RwlockDestroy (LosRwlock *rwlock) |
Destroy a rwlock. 更多... | |
UINT32 | LOS_RwlockRdLock (LosRwlock *rwlock, UINT32 timeout) |
Wait to lock a read lock. 更多... | |
UINT32 | LOS_RwlockTryRdLock (LosRwlock *rwlock) |
Try wait to lock a read lock. 更多... | |
UINT32 | LOS_RwlockWrLock (LosRwlock *rwlock, UINT32 timeout) |
Wait to lock a write lock. 更多... | |
UINT32 | LOS_RwlockTryWrLock (LosRwlock *rwlock) |
Try wait to lock a write lock. 更多... | |
UINT32 | LOS_RwlockUnLock (LosRwlock *rwlock) |
Release a rwlock. 更多... | |
Destroy a rwlock.
rwlock | [IN] Handle of the rwlock to be deleted. |
#LOS_EINVAL | The rwlock pointer is NULL. |
#LOS_EBUSY | Tasks pended on this rwlock. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_OK | The rwlock is successfully deleted. |
Destroy a rwlock.
在文件 los_rwlock.c 第 102 行定义.
Init a rwlock.
rwlock | [IN] Handle pointer of the successfully init rwlock. |
#LOS_EINVAL | The rwlock pointer is NULL. |
#LOS_EPERM | Multiply initialization. |
#LOS_OK | The rwlock is successfully created. |
Init a rwlock.
在文件 los_rwlock.c 第 79 行定义.
Wait to lock a read lock.
rwlock | [IN] Handle of the rwlock to be waited on. |
timeout | [IN] Waiting time. The value range is [0, LOS_WAIT_FOREVER](unit: Tick). |
#LOS_EINVAL | The rwlock pointer is NULL, The timeout is zero or Lock status error. |
#LOS_EINTR | The rwlock is being locked during an interrupt. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_EDEADLK | Rwlock error check failed or System locked task scheduling. |
#LOS_ETIMEDOUT | The rwlock waiting times out. |
#LOS_EPERM | The rwlock is used in system tasks. |
#LOS_OK | The rwlock is successfully locked. |
Wait to lock a read lock.
在文件 los_rwlock.c 第 321 行定义.
Try wait to lock a read lock.
rwlock | [IN] Handle of the rwlock to be waited on. |
#LOS_EINVAL | The rwlock pointer is NULL or Lock status error. |
#LOS_EINTR | The rwlock is being locked during an interrupt. |
#LOS_EBUSY | Fail to get the rwlock, the rwlock has been used. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_EDEADLK | rwlock error check failed or System locked task scheduling. |
#LOS_ETIMEDOUT | The rwlock waiting times out. |
#LOS_EPERM | The rwlock is used in system tasks. |
#LOS_OK | The rwlock is successfully locked. |
Try wait to lock a read lock.
在文件 los_rwlock.c 第 336 行定义.
Try wait to lock a write lock.
rwlock | [IN] Handle of the rwlock to be waited on. |
#LOS_EINVAL | The rwlock pointer is NULL or Lock status error. |
#LOS_EINTR | The rwlock is being locked during an interrupt. |
#LOS_EBUSY | Fail to get the rwlock, the rwlock has been used. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_EDEADLK | rwlock error check failed or System locked task scheduling. |
#LOS_ETIMEDOUT | The rwlock waiting times out. |
#LOS_EPERM | The rwlock is used in system tasks. |
#LOS_OK | The rwlock is successfully locked. |
Try wait to lock a write lock.
在文件 los_rwlock.c 第 366 行定义.
Release a rwlock.
rwlock | [IN] Handle of the rwlock to be released. |
#LOS_EINVAL | The rwlock pointer is NULL, The timeout is zero or Lock status error. |
#LOS_EINTR | The rwlock is being locked during an interrupt. |
#LOS_EPERM | The rwlock is not locked or has been used. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_EDEADLK | rwlock error check failed or System locked task scheduling. |
#LOS_ETIMEDOUT | The rwlock waiting times out. |
#LOS_EPERM | The rwlock is used in system tasks. |
#LOS_OK | The rwlock is successfully locked. |
Release a rwlock.
在文件 los_rwlock.c 第 482 行定义.
Wait to lock a write lock.
rwlock | [IN] Handle of the rwlock to be waited on. |
timeout | [IN] Waiting time. The value range is [0, LOS_WAIT_FOREVER](unit: Tick). |
#LOS_EINVAL | The rwlock pointer is NULL, The timeout is zero or Lock status error. |
#LOS_EINTR | The rwlock is being locked during an interrupt. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_EDEADLK | Rwlock error check failed or System locked task scheduling. |
#LOS_ETIMEDOUT | The rwlock waiting times out. |
#LOS_EPERM | The rwlock is used in system tasks. |
#LOS_OK | The rwlock is successfully locked. |
Wait to lock a write lock.
在文件 los_rwlock.c 第 351 行定义.