加入收藏
举报
当前仅显示指定条件回帖 [ 展开查看全部 ]
02-14 20:02
#
文件名称:
osal_spinlock-h.md
所在目录:
Openharmony v1.0 / docs / api / api-SmartVision-Devices
文件大小:
8.48 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# osal\_spinlock.h
## **Overview**
**Related Modules:**
[OSAL](OSAL.md)
**Description:**
Declares spinlock types and interfaces.
This file provides the interfaces for initializing, destroying, obtaining, and releasing a spinlock, the interfaces for obtaining a spinlock and disabling the interrupt request \(IRQ\), releasing a spinlock and enabling the IRQ, obtaining a spinlock, disabling the IRQ, and saving its status, and releasing a spinlock, enabling the IRQ, and restoring the saved IRQ status. The spinlock needs to be destroyed when it is no longer used.
**Since:**
1.0
**Version:**
1.0
## **Summary**
## Data Structures









Data Structure Name


Description


OsalSpinlock


Describes a spinlock.



## Macros









Macro Name and Value


Description


OSAL_DECLARE_SPINLOCK(spinlock)   OsalSpinlock spinlock


Defines a spinlock.



## Functions






























Function Name


Description


OsalSpinInit (OsalSpinlock *spinlock)


int32_t 


Initializes a spinlock.


OsalSpinDestroy (OsalSpinlock *spinlock)


int32_t 


Destroys a spinlock.


OsalSpinLock (OsalSpinlock *spinlock)


int32_t 


Obtains a spinlock.


OsalSpinUnlock (OsalSpinlock *spinlock)


int32_t 


Releases a spinlock.


OsalSpinLockIrq (OsalSpinlock *spinlock)


int32_t 


Obtains a spinlock and disables the IRQ.


OsalSpinUnlockIrq (OsalSpinlock *spinlock)


int32_t 


Releases a spinlock and enables the IRQ.


OsalSpinLockIrqSave (OsalSpinlock *spinlock, uint32_t *flags)


int32_t 


Obtains a spinlock, disables the IRQ, and saves its status.


OsalSpinUnlockIrqRestore (OsalSpinlock *spinlock, uint32_t *flags)


int32_t 


Releases a spinlock, enables the IRQ, and restores the saved IRQ status.


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