当前位置:网站首页>B_QuRT_User_Guide(39)
B_QuRT_User_Guide(39)
2022-07-07 21:52:00 【weixin_38498942】
B_QuRT_User_Guide(39)
- 27 原子操作
- 27.1 qurt_atomic_set()
- 27.2 qurt_atomic_and()
- 27.3 qurt_atomic_and_return()
- 27.4 qurt_atomic_or()
- 27.5 qurt_atomic_or_return()
- 27.6 qurt_atomic_xor()
- 27.7 qurt_atomic_xor_return()
- 27.8 qurt_atomic_set_bit()
- 27.9 qurt_atomic_clear_bit()
- 27.10 qurt_atomic_change_bit()
- 27.11 qurt_atomic_add()
- 27.12 qurt_atomic_add_return()
- 27.13 qurt_atomic_add_unless()
- 27.14 qurt_atomic_sub()
- 27.15 qurt_atomic_sub_return()
- 27.16 qurt_atomic_inc()
- 27.17 qurt_atomic_inc_return()
- 27.18 qurt_atomic_dec()
27 原子操作
QuRT 内核原子操作可通过以下章节中的 QuRT 函数访问。
27.1 qurt_atomic_set()
27.1.1 功能文档
27.1.1.1 static QURT_INLINE unsigned int qurt_atomic_set ( unsigned int ∗ target,unsigned int value )
设置具有指定值的原子变量。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | value | 要设置的值。 |
返回值
值成功设置。
依赖项
None.
27.2 qurt_atomic_and()
27.2.1 功能文档
27.2.1.1 static QURT_INLINE void qurt_atomic_and ( unsigned int ∗ target, unsigned int mask )
带有掩码的原子变量的按位与运算。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | mask | 按位与的掩码。 |
返回值
None.
依赖项
None.
27.3 qurt_atomic_and_return()
27.3.1 功能文档
27.3.1.1 static QURT_INLINE unsigned int qurt_atomic_and_return ( unsigned int ∗target, unsigned int mask )
带有掩码的原子变量的按位与运算。
注意:函数重试直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | mask | 按位与的掩码。 |
返回值
带有掩码的原子变量的 AND 结果。
依赖项
None.
27.4 qurt_atomic_or()
27.4.1 功能文档
27.4.1.1 static QURT_INLINE void qurt_atomic_or ( unsigned int ∗ target, unsigned int mask )
带有掩码的原子变量的按位或运算。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | mask | 按位或的掩码。 |
返回值
None.
依赖项
None.
27.5 qurt_atomic_or_return()
27.5.1 功能文档
27.5.1.1 static QURT_INLINE unsigned int qurt_atomic_or_return ( unsigned int ∗target, unsigned int mask )
带有掩码的原子变量的按位或运算。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | mask | 按位或的掩码。 |
返回值
返回带有掩码的原子变量的 OR 结果。
依赖项
None.
27.6 qurt_atomic_xor()
27.6.1 功能文档
27.6.1.1 static QURT_INLINE void qurt_atomic_xor ( unsigned int ∗ target, unsigned int mask )
带有掩码的原子变量的按位异或运算。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | mask | 按位异或的掩码。 |
返回值
None.
依赖项
None.
27.7 qurt_atomic_xor_return()
27.7.1 功能文档
27.7.1.1 static QURT_INLINE unsigned int qurt_atomic_xor_return ( unsigned int ∗target, unsigned int mask )
带有掩码的原子变量的按位异或运算。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | mask | 按位异或的掩码。 |
返回值
带有掩码的原子变量的异或结果。
依赖项
None.
27.8 qurt_atomic_set_bit()
27.8.1 功能文档
27.8.1.1 static QURT_INLINE void qurt_atomic_set_bit ( unsigned int ∗ target,unsigned int bit )
在原子变量中的指定位置设置一个位。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | bit | 要设置的bit位置。 |
返回值
None.
依赖项
None.
27.9 qurt_atomic_clear_bit()
27.9.1 功能文档
27.9.1.1 static QURT_INLINE void qurt_atomic_clear_bit ( unsigned int ∗ target,unsigned int bit )
清除原子变量中指定位置的位。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | bit | 要清除的bit位置。 |
返回值
None.
依赖项
None.
27.10 qurt_atomic_change_bit()
27.10.1 功能文档
27.10.1.1 static QURT_INLINE void qurt_atomic_change_bit ( unsigned int ∗ target,unsigned int bit )
在bit位置的原子变量中切换位。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | bit | 要切换的bit位置。 |
返回值
None.
依赖项
None.
27.11 qurt_atomic_add()
27.11.1 功能文档
27.11.1.1 static QURT_INLINE void qurt_atomic_add ( unsigned int ∗ target, unsigned int v )
将整数加到原子变量。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | v | 要添加的整数值。 |
返回值
None.
依赖项
None.
27.12 qurt_atomic_add_return()
27.12.1 功能文档
27.12.1.1 static QURT_INLINE unsigned int qurt_atomic_add_return ( unsigned int ∗target, unsigned int v )
将整数加到原子变量。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | v | 要添加的整数值。 |
返回值
算术和的结果。
依赖项
None.
27.13 qurt_atomic_add_unless()
27.13.1 功能文档
27.13.1.1 static QURT_INLINE unsigned int qurt_atomic_add_unless ( unsigned int ∗target, unsigned int delta, unsigned int unless )
将增量值加到原子变量,除非目标中的当前值与除非变量匹配。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | delta | 加到当前值的值。 |
| in | unless | 仅当当前值不等于unless值时才执行加法。 |
返回值
TRUE 1 - 执行了加法。
FALSE 0 - 加法未完成。
依赖项
None.
27.14 qurt_atomic_sub()
27.14.1 功能文档
27.14.1.1 static QURT_INLINE void qurt_atomic_sub ( unsigned int ∗ target, unsigned int v )
从原子变量中减去一个整数。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | v | 要减去的整数值。 |
返回值
None.
依赖项
None.
27.15 qurt_atomic_sub_return()
27.15.1 功能文档
27.15.1.1 static QURT_INLINE unsigned int qurt_atomic_sub_return ( unsigned int ∗target, unsigned int v )
从原子变量中减去一个整数。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
| in | v | 要减去的整数值。 |
返回值
算术减法的结果。
依赖项
None.
27.16 qurt_atomic_inc()
27.16.1 功能文档
27.16.1.1 static QURT_INLINE void qurt_atomic_inc ( unsigned int ∗ target )
将原子变量加一。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
返回值
None.
依赖项
None.
27.17 qurt_atomic_inc_return()
27.17.1 功能文档
27.17.1.1 static QURT_INLINE unsigned int qurt_atomic_inc_return ( unsigned int ∗target )
将原子变量加一。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
返回值
增量值。
依赖项
None.
27.18 qurt_atomic_dec()
27.18.1 功能文档
27.18.1.1 static QURT_INLINE void qurt_atomic_dec ( unsigned int ∗ target )
将原子变量减一。
注意:该函数会重试,直到加载锁定和条件存储成功。
参数
| in,out | target | 指向原子变量的指针。 |
返回值
None.
依赖项
None.
边栏推荐
- UE4_ Ue5 panoramic camera
- UE4_UE5全景相机
- ArcGIS: field assignment_ The attribute table field calculator assigns values to fields based on conditions
- Kubernetes' simplified data storage storageclass (creation, deletion and initial use)
- Count the top 10 films at the box office and save them in another file
- HDU 4747 mex "recommended collection"
- The 19th Zhejiang Provincial College Programming Contest 2022 f.easyfix chairman tree
- Inftnews | the wide application of NFT technology and its existing problems
- The text editor of markdown class should add colors to fonts (including typora, CSDN, etc.)
- 经纬度PLT文件格式说明
猜你喜欢

Wechat forum exchange applet system graduation design (5) assignment
![Ros2 topic (03): the difference between ros1 and ros2 [02]](/img/12/244ea30b5b141a0f47a54c08f4fe9f.png)
Ros2 topic (03): the difference between ros1 and ros2 [02]

B_QuRT_User_Guide(37)

When copying something from the USB flash disk, an error volume error is reported. Please run CHKDSK

Wechat forum exchange applet system graduation design (3) background function

Technology at home and abroad people "see" the future of audio and video technology

14、 Two methods of database export and import

Wechat forum exchange applet system graduation design completion (1) development outline
![给出一个数组,如 [7864, 284, 347, 7732, 8498],现在需要将数组中的数字拼接起来,返回「最大的可能拼出的数字」](/img/21/2e99dd6173ab4925ec22290cd4a357.png)
给出一个数组,如 [7864, 284, 347, 7732, 8498],现在需要将数组中的数字拼接起来,返回「最大的可能拼出的数字」

Wechat forum exchange applet system graduation design (2) applet function
随机推荐
V-for traversal object
HDU 4747 Mex「建议收藏」
turbo intruder常用脚本
Matlab-SEIR传染病模型预测
移动端异构运算技术 - GPU OpenCL 编程(基础篇)
UE4_UE5全景相机
USB(十五)2022-04-14
HDU 4747 mex "recommended collection"
成年人只有一份主业是要付出代价的,被人事劝退后,我哭了一整晚
Turbo introder common scripts
欢聚时代一面
Happy gathering time
Oracle-数据库的备份与恢复
家用电器行业渠道商协同系统解决方案:助力家电企业快速实现渠道互联网化
CAIP2021 初赛VP
Experience sharing of system architecture designers in preparing for the exam: the direction of paper writing
2022第六季完美童模陕西总决赛圆满落幕
Gee (III): calculate the correlation coefficient between two bands and the corresponding p value
Add data analysis tools in Excel
php 使用阿里云存储