当前位置:网站首页>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.
边栏推荐
- LDO穩壓芯片-內部框圖及選型參數
- 系统架构设计师备考经验分享:论文出题方向
- 给出一个数组,如 [7864, 284, 347, 7732, 8498],现在需要将数组中的数字拼接起来,返回「最大的可能拼出的数字」
- The 19th Zhejiang Provincial Collegiate Programming Contest 2022浙江省赛 F.EasyFix 主席树
- 【编译原理】词法分析设计实现
- B_QuRT_User_Guide(39)
- First week of July
- 欢聚时代一面
- The 19th Zhejiang Provincial College Programming Contest 2022 f.easyfix chairman tree
- 深入理解Mysql锁与事务隔离级别
猜你喜欢
随机推荐
给出一个数组,如 [7864, 284, 347, 7732, 8498],现在需要将数组中的数字拼接起来,返回「最大的可能拼出的数字」
The 19th Zhejiang Provincial Collegiate Programming Contest 2022浙江省赛 F.EasyFix 主席树
高效的S2B2C电商系统,是这样帮助电子材料企业提升应变能力的
POJ2392 SpaceElevator [DP]
2022 Season 6 perfect children's model Shaanxi finals came to a successful conclusion
POJ2392 SpaceElevator [DP]
Three questions TDM
进度播报|广州地铁七号线全线29台盾构机全部完成始发
Lm12 rolling heikin Ashi double K-line filter
FPGA basics catalog
PCB wiring rules of PCI Express interface
New potential energy of industrial integration, Xiamen station of city chain technology digital summit successfully held
UE4_ Ue5 combined with Logitech handle (F710) use record
B_ QuRT_ User_ Guide(40)
【7.5】15. 三数之和
Entity层、DAO层、Service层、Controller层 先后顺序
Unity3D学习笔记6——GPU实例化(1)
2022 届的应届生都找到工作了吗?做自媒体可以吗?
Mobile heterogeneous computing technology - GPU OpenCL programming (basic)
Installing spss25