首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

atomic_flag_clear_explicit

在头文件<stdatomic.h>中定义

void atomic_flag_clear(volatile atomic_flag * obj);

(1)

(自C11以来)

void atomic_flag_clear_explicit(volatile atomic_flag * obj,memory_order order);

(2)

(自C11以来)

原子atomic_flag上通过objclear(false)将指向的状态改变。第一个版本根据命令对内存进行访问memory_order_seq_cst,第二个版本根据内存访问内存访问order

参数是指向易失性原子标志的指针,以接受非易失性和易失性(例如内存映射I/O)原子标志的地址。

参数

obj

-

指向要修改的原子标记对象的指针

order

-

此操作的内存同步排序:所有值都是允许的

返回值

(none).

参考

  • C11标准(ISO/IEC 9899:2011):
    • 7.17.8.2 atomic_flag_clear函数(p: 286)

另请参阅

atomic_flag_test_and_setatomic_flag_test_and_set_explicit(C11)

将atomic_flag设置为true并返回旧值(函数)

| atomic_flag_clear,atomic_flag_clear_explicit的C ++文档 |

扫码关注腾讯云开发者

领取腾讯云代金券