结构体 | |
struct | OsMux |
类型定义 | |
typedef struct OsMux | LosMux |
函数 | |
UINT32 | LOS_MuxInit (LosMux *mutex, const LosMuxAttr *attr) |
Init a mutex. 更多... | |
UINT32 | LOS_MuxDestroy (LosMux *mutex) |
Destroy a mutex. 更多... | |
UINT32 | LOS_MuxLock (LosMux *mutex, UINT32 timeout) |
Wait to lock a mutex. 更多... | |
UINT32 | LOS_MuxTrylock (LosMux *mutex) |
Try wait to lock a mutex. 更多... | |
UINT32 | LOS_MuxUnlock (LosMux *mutex) |
Release a mutex. 更多... | |
Destroy a mutex.
mutex | [IN] Handle of the mutex to be deleted. |
#LOS_EINVAL | The mutex pointer is NULL. |
#LOS_EBUSY | Tasks pended on this mutex. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_OK | The mutex is successfully deleted. |
Destroy a mutex.
UINT32 LOS_MuxInit | ( | LosMux * | mutex, |
const LosMuxAttr * | attr | ||
) |
Init a mutex.
mutex | [IN] Handle pointer of the successfully init mutex. |
attr | [IN] The mutex attribute. |
#LOS_EINVAL | The mutex pointer is NULL. |
#LOS_OK | The mutex is successfully created. |
Init a mutex.
Wait to lock a mutex.
mutex | [IN] Handle of the mutex to be waited on. |
timeout | [IN] Waiting time. The value range is [0, LOS_WAIT_FOREVER](unit: Tick). |
#LOS_EINVAL | The mutex pointer is NULL, The timeout is zero or Lock status error. |
#LOS_EINTR | The mutex is being locked during an interrupt. |
#LOS_EBUSY | Tasks pended on this mutex. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_EDEADLK | Mutex error check failed or System locked task scheduling. |
#LOS_ETIMEDOUT | The mutex waiting times out. |
#LOS_OK | The mutex is successfully locked. |
Wait to lock a mutex.
Try wait to lock a mutex.
mutex | [IN] Handle of the mutex to be waited on. |
#LOS_EINVAL | The mutex pointer is NULL or Lock status error. |
#LOS_EINTR | The mutex is being locked during an interrupt. |
#LOS_EBUSY | Tasks pended on this mutex. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_EDEADLK | Mutex error check failed or System locked task scheduling. |
#LOS_ETIMEDOUT | The mutex waiting times out. |
#LOS_OK | The mutex is successfully locked. |
Try wait to lock a mutex.
Release a mutex.
mutex | [IN] Handle of the mutex to be released. |
#LOS_EINVAL | The mutex pointer is NULL, The timeout is zero or Lock status error. |
#LOS_EINTR | The mutex is being locked during an interrupt. |
#LOS_EBUSY | Tasks pended on this mutex. |
#LOS_EBADF | The lock has been destroyed or broken. |
#LOS_EDEADLK | Mutex error check failed or System locked task scheduling. |
#LOS_ETIMEDOUT | The mutex waiting times out. |
#LOS_OK | The mutex is successfully locked. |
Release a mutex.