当前位置:网站首页>B_ QuRT_ User_ Guide(39)
B_ QuRT_ User_ Guide(39)
2022-07-07 23:30:00 【weixin_ thirty-eight million four hundred and ninety-eight thou】
B_QuRT_User_Guide(39)
- 27 Atomic manipulation
- 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 Atomic manipulation
QuRT Kernel atomic operations can be performed through QuRT Function access .
27.1 qurt_atomic_set()
27.1.1 Function document
27.1.1.1 static QURT_INLINE unsigned int qurt_atomic_set ( unsigned int ∗ target,unsigned int value )
Set the atomic variable with the specified value .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | value | The value to set . |
Return value
Value successfully set .
Dependencies
None.
27.2 qurt_atomic_and()
27.2.1 Function document
27.2.1.1 static QURT_INLINE void qurt_atomic_and ( unsigned int ∗ target, unsigned int mask )
Bitwise and operation of masked atomic variables .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | mask | Mask by bit and . |
Return value
None.
Dependencies
None.
27.3 qurt_atomic_and_return()
27.3.1 Function document
27.3.1.1 static QURT_INLINE unsigned int qurt_atomic_and_return ( unsigned int ∗target, unsigned int mask )
Bitwise and operation of masked atomic variables .
Be careful : The function retries until the load lock and condition store succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | mask | Mask by bit and . |
Return value
With masked atomic variables AND result .
Dependencies
None.
27.4 qurt_atomic_or()
27.4.1 Function document
27.4.1.1 static QURT_INLINE void qurt_atomic_or ( unsigned int ∗ target, unsigned int mask )
Bitwise OR operation of masked atomic variables .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | mask | Mask by bit or . |
Return value
None.
Dependencies
None.
27.5 qurt_atomic_or_return()
27.5.1 Function document
27.5.1.1 static QURT_INLINE unsigned int qurt_atomic_or_return ( unsigned int ∗target, unsigned int mask )
Bitwise OR operation of masked atomic variables .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | mask | Mask by bit or . |
Return value
Returns the of the masked atomic variable OR result .
Dependencies
None.
27.6 qurt_atomic_xor()
27.6.1 Function document
27.6.1.1 static QURT_INLINE void qurt_atomic_xor ( unsigned int ∗ target, unsigned int mask )
Bitwise XOR of masked atomic variables .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | mask | Mask by bitwise XOR . |
Return value
None.
Dependencies
None.
27.7 qurt_atomic_xor_return()
27.7.1 Function document
27.7.1.1 static QURT_INLINE unsigned int qurt_atomic_xor_return ( unsigned int ∗target, unsigned int mask )
Bitwise XOR of masked atomic variables .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | mask | Mask by bitwise XOR . |
Return value
XOR result of masked atomic variables .
Dependencies
None.
27.8 qurt_atomic_set_bit()
27.8.1 Function document
27.8.1.1 static QURT_INLINE void qurt_atomic_set_bit ( unsigned int ∗ target,unsigned int bit )
Set a bit at the specified position in the atomic variable .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | bit | To set up bit Location . |
Return value
None.
Dependencies
None.
27.9 qurt_atomic_clear_bit()
27.9.1 Function document
27.9.1.1 static QURT_INLINE void qurt_atomic_clear_bit ( unsigned int ∗ target,unsigned int bit )
Clear the bit at the specified position in the atomic variable .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | bit | To be cleared bit Location . |
Return value
None.
Dependencies
None.
27.10 qurt_atomic_change_bit()
27.10.1 Function document
27.10.1.1 static QURT_INLINE void qurt_atomic_change_bit ( unsigned int ∗ target,unsigned int bit )
stay bit Switch bits in atomic variables of position .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | bit | To switch bit Location . |
Return value
None.
Dependencies
None.
27.11 qurt_atomic_add()
27.11.1 Function document
27.11.1.1 static QURT_INLINE void qurt_atomic_add ( unsigned int ∗ target, unsigned int v )
Add integers to atomic variables .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | v | Integer value to add . |
Return value
None.
Dependencies
None.
27.12 qurt_atomic_add_return()
27.12.1 Function document
27.12.1.1 static QURT_INLINE unsigned int qurt_atomic_add_return ( unsigned int ∗target, unsigned int v )
Add integers to atomic variables .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | v | Integer value to add . |
Return value
The result of arithmetic sum .
Dependencies
None.
27.13 qurt_atomic_add_unless()
27.13.1 Function document
27.13.1.1 static QURT_INLINE unsigned int qurt_atomic_add_unless ( unsigned int ∗target, unsigned int delta, unsigned int unless )
Add the increment value to the atomic variable , Unless the current value in the target matches the variable .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | delta | The value added to the current value . |
in | unless | Only if the current value is not equal to unless Value before adding . |
Return value
TRUE 1 - Addition performed .
FALSE 0 - Addition incomplete .
Dependencies
None.
27.14 qurt_atomic_sub()
27.14.1 Function document
27.14.1.1 static QURT_INLINE void qurt_atomic_sub ( unsigned int ∗ target, unsigned int v )
Subtract an integer from the atomic variable .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | v | The integer value to subtract . |
Return value
None.
Dependencies
None.
27.15 qurt_atomic_sub_return()
27.15.1 Function document
27.15.1.1 static QURT_INLINE unsigned int qurt_atomic_sub_return ( unsigned int ∗target, unsigned int v )
Subtract an integer from the atomic variable .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
in | v | The integer value to subtract . |
Return value
The result of arithmetic subtraction .
Dependencies
None.
27.16 qurt_atomic_inc()
27.16.1 Function document
27.16.1.1 static QURT_INLINE void qurt_atomic_inc ( unsigned int ∗ target )
Add one to the atomic variable .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
Return value
None.
Dependencies
None.
27.17 qurt_atomic_inc_return()
27.17.1 Function document
27.17.1.1 static QURT_INLINE unsigned int qurt_atomic_inc_return ( unsigned int ∗target )
Add one to the atomic variable .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
Return value
Incremental value .
Dependencies
None.
27.18 qurt_atomic_dec()
27.18.1 Function document
27.18.1.1 static QURT_INLINE void qurt_atomic_dec ( unsigned int ∗ target )
Subtract the atomic variable by one .
Be careful : This function will retry , Until the loading lock and condition storage succeed .
Parameters
in,out | target | Pointer to atomic variable . |
Return value
None.
Dependencies
None.
边栏推荐
- Unity3d learning notes 4 - create mesh advanced interface
- Unity3d Learning Notes 6 - GPU instantiation (1)
- Force deduction solution summary 648 word replacement
- FreeLink开源呼叫中心设计思想
- Unity3D学习笔记5——创建子Mesh
- VS扩展工具笔记
- Deep understanding of MySQL lock and transaction isolation level
- 2021icpc Shanghai h.life is a game Kruskal reconstruction tree
- SQL database execution problems
- 谷歌浏览器怎么登录及开启同步功能
猜你喜欢
ROS2专题(03):ROS1和ROS2的区别【01】
生鲜行业数字化采购管理系统:助力生鲜企业解决采购难题,全程线上化采购执行
Explain
Spark 离线开发框架设计与实现
UE4_UE5蓝图command节点的使用(开启关闭屏幕响应-log-发布全屏显示)
Unity3d learning notes 5 - create sub mesh
Summary of SQL single table query 2020.7.27
SRM supplier cloud collaborative management platform solution for building materials industry to realize business application scalability and configuration
在软件工程领域,搞科研的这十年!
SAP 内存参数调优过程
随机推荐
云原生正在吞噬一切,开发者该如何应对?
Unity3D学习笔记4——创建Mesh高级接口
php 使用阿里云存储
Deep understanding of MySQL lock and transaction isolation level
ROS2专题(03):ROS1和ROS2的区别【02】
RE1 attack and defense world reverse
UE4_ Ue5 combined with Logitech handle (F710) use record
Opencv scalar passes in three parameters, which can only be displayed in black, white and gray. Solve the problem
B_QuRT_User_Guide(38)
移动端异构运算技术 - GPU OpenCL 编程(基础篇)
1. Sum of two numbers
Adrnoid Development Series (XXV): create various types of dialog boxes using alertdialog
SAP HR 劳动合同信息 0016
Sequence of entity layer, Dao layer, service layer and controller layer
HDU 4747 Mex「建议收藏」
Unity3d learning notes 4 - create mesh advanced interface
给出一个数组,如 [7864, 284, 347, 7732, 8498],现在需要将数组中的数字拼接起来,返回「最大的可能拼出的数字」
Illegal behavior analysis 1
Ros2 topic (03): the difference between ros1 and ros2 [02]
Windows set redis to start automatically