当前位置:网站首页>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.
边栏推荐
猜你喜欢
Summary of SQL single table query 2020.7.27
UE4_UE5结合罗技手柄(F710)使用记录
LDO穩壓芯片-內部框圖及選型參數
给出一个数组,如 [7864, 284, 347, 7732, 8498],现在需要将数组中的数字拼接起来,返回「最大的可能拼出的数字」
Mysql索引优化实战一
Ros2 topic (03): the difference between ros1 and ros2 [01]
B_QuRT_User_Guide(38)
Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting
Explain
First week of July
随机推荐
Vs extension tool notes
电子设备行业智能供应链协同平台解决方案:解决低效, 赋能产业数字化升级
Unity3d Learning Notes 6 - GPU instantiation (1)
USB (XVIII) 2022-04-17
2022 届的应届生都找到工作了吗?做自媒体可以吗?
SAP HR奖罚信息导出
PCB wiring rules of PCI Express interface
Spark 离线开发框架设计与实现
[compilation principle] lexical analysis design and Implementation
The efficient s2b2c e-commerce system helps electronic material enterprises improve their adaptability in this way
HDU 4747 mex "recommended collection"
POJ2392 SpaceElevator [DP]
系统架构设计师备考经验分享:论文出题方向
Sequence of entity layer, Dao layer, service layer and controller layer
2021icpc Shanghai h.life is a game Kruskal reconstruction tree
Solution: prompt "unsupported video format" when inserting avi format video into the message
USB (XIV) 2022-04-12
Install Fedora under RedHat
Cloud native is devouring everything. How should developers deal with it?
云原生数据仓库AnalyticDB MySQL版用户手册