memory_order_relaxed only guarantees atomicity and not visibility?

前端 未结 0 1137
闹比i
闹比i 2021-02-06 00:05

Given the below C code:

static atomic_int a_i;

static void f() 
{
   for (int i = 0; i < 100; ++i)
     atomic_fetch_add_explicit(&a_i, 1, memory_order_re         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题