加入收藏
举报
当前仅显示指定条件回帖 [ 展开查看全部 ]
02-14 20:02
#
文件名称:
osal_atomic-h.md
所在目录:
Openharmony v1.0 / docs / api / api-SmartVision-Devices
文件大小:
7.25 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# osal\_atomic.h
## **Overview**
**Related Modules:**
[OSAL](OSAL.md)
**Description:**
Declares atomic and bit operation interfaces.
This file provides interfaces such as reading and setting an atomic, incrementing and decrementing an atomic counter by 1. This file also provides interfaces such as checking the bit status of a variable, and setting and clearing the bit value of a variable.
**Since:**
1.0
**Version:**
1.0
## **Summary**
## Data Structures









Data Structure Name


Description


OsalAtomic


Describes an atomic.



## Functions






























Function Name


Description


OsalAtomicRead (const OsalAtomic *v)


int32_t 


Reads the counter of an atomic.


OsalAtomicSet (OsalAtomic *v, int32_t counter)


void 


Sets the counter for an atomic.


OsalAtomicInc (OsalAtomic *v)


void 


Increments the counter of an atomic by 1.


OsalAtomicDec (OsalAtomic *v)


void 


Decrements the counter of an atomic by 1.


OsalTestBit (unsigned long nr, const volatile unsigned long *addr)


int32_t 


Tests the value of a specified bit of a variable.


OsalTestSetBit (unsigned long nr, volatile unsigned long *addr)


int32_t 


Sets the value of a specified bit of the variable and returns the bit value before the setting.


OsalTestClearBit (unsigned long nr, volatile unsigned long *addr)


int32_t 


Clears the value of a specified bit of the variable and returns the bit value before clearing.


OsalClearBit (unsigned long nr, volatile unsigned long *addr)


void 


Clears the value of a specified bit of the variable.


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