加入收藏
举报
02-14 20:02
#0
文件名称:
osal_mutex-h.md
所在目录:
Openharmony v1.0 / docs / api / api-SmartVision-Devices
文件大小:
6.17 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# osal\_mutex.h
## **Overview**
**Related Modules:**
[OSAL](OSAL.md)
**Description:**
Declares mutex types and interfaces.
This file provides interfaces for initializing and destroying a mutex, locking a mutex, locking a mutex upon timeout, and unlocking a mutex. The mutex must be destroyed after being used.
**Since:**
1.0
**Version:**
1.0
## **Summary**
## Data Structures









Data Structure Name


Description


OsalMutex


Describes a mutex.



## Macros









Macro Name and Value


Description


OSAL_DECLARE_MUTEX(mutex)   struct OsalMutex mutex


Defines a mutex.



## Functions





















Function Name


Description


OsalMutexInit (struct OsalMutex *mutex)


int32_t 


Initializes a mutex.


OsalMutexDestroy (struct OsalMutex *mutex)


int32_t 


Destroys a mutex.


OsalMutexLock (struct OsalMutex *mutex)


int32_t 


Locks a mutex.


OsalMutexTimedLock (struct OsalMutex *mutex, uint32_t ms)


int32_t 


Locks a mutex with a specified timeout duration.


OsalMutexUnlock (struct OsalMutex *mutex)


int32_t 


Unlocks a mutex.


点赞 回复
回帖
支持markdown部分语法 ?