Atom 變數的指標, atomic物件,儲存型別的值Ty。 Value 型別Ty 的值。 Order A memory_order。傳回值預存的值為Atom在交換之前。備註atomic_exchange_explicit函式在執行read-modify-write作業來交換中所儲存的值Atom與Value,並套用記憶體的條件約束所指定的Order。
atomic_exchange, atomic_exchange_explicit 定义于头文件<stdatomic.h> C atomic_exchange(volatileA*obj, C desired); (1)(C11 起) C atomic_exchange_explicit(volatileA*obj, C desired,memory_orderorder); (2)(C11 起) 原子地以desired替换obj所指向的对象的值,并返回obj先前所保有的值。此操作是读...
C atomic_exchange( volatile A* obj, C desired ); (1) (C11 起) C atomic_exchange_explicit( volatile A* obj, C desired, memory_order order ); (2) (C11 起) 原子地以 desired 替换obj 所指向的对象的值,并返回 obj 先前所保有的值。此操作是读修改写操作。第一版本按照 memory_order_seq...
C atomic_exchange( volatile A* obj, C desired ); (1) (C11 起) C atomic_exchange_explicit( volatile A* obj, C desired, memory_order order ); (2) (C11 起) 原子地以 desired 替换obj 所指向的对象的值,并返回 obj 先前所保有的值。此操作是读修改写操作。第一版本按照 memory_order_seq_...
atomic_exchange_explicit 在头文件<stdatomic.h>中定义 C原子扩展(volatile A * obj,需要C); (1) (自C11以来) C atomic_exchange_explicit(volatile A * obj,C desired,memory_order order); (2) (自C11以来) 原子替换objwith 指向的值desired并返回obj之前保存的值。操作是读取 - 修改 - 写...
C atomic_exchange( volatile A* obj, C desired ); (1) (since C11) C atomic_exchange_explicit( volatile A* obj, C desired, memory_order order ); (2) (since C11) Atomically replaces the value pointed by obj with desired and returns the value obj held previously. The operation is rea...
Catomic_exchange_explicit(volatileA*object,Cvalue, memory_orderorder); Parameters A One of the atomic types. C The corresponding non-atomic type ofA. object A pointer that points to the atomic object to modify. value The value to replace the atomic object with. ...
C atomic_exchange( volatile A* obj, C desired ); (1) (C11 起) C atomic_exchange_explicit( volatile A* obj, C desired, memory_order order ); (2) (C11 起) 原子地以 desired 替换obj 所指向的对象的值,并返回 obj 先前所保有的值。此操作是读修改写操作。第一版本按照 memory_order_seq...
C11标准(ISO/IEC 9899:2011): 7.17.7.4 atomic_compare_exchange通用函数(p: 283-284) 另请参阅 atomic_exchangeatomic_exchange_explicit(C11)用原子对象(函数)的值交换一个值 | C ++文档:atomic_compare_exchange_weak,atomic_compare_exchange_strong,atomic_compare_exchange_weak_explicit,atomic_compare_exchang...
atomic_exchange atomic_exchange_explicit atomic_fetch_add atomic_fetch_add_explicit atomic_fetch_and atomic_fetch_and_explicit atomic_fetch_or atomic_fetch_or_explicit atomic_fetch_sub atomic_fetch_sub_explicit atomic_fetch_xor atomic_fetch_xor_explicit ...