atomic variable classes 原子变量类
To declare an atomic variable, you simply declare a variable of type atomic_t.
要声明一个原子变量(atomic variable),首先声明一个atomic _ t类型的变量。
It's also possible to initialize the atomic variable at runtime using the atomic_set function.
也可以使用atomic_set function在运行时对原子变量进行初始化。
Next, you ensure that your atomic variable is initialized using the ATOMIC_INIT symbolic constant.
接下来,需确保您的原子变量使用ATOMIC_INIT符号常量进行了初始化。
应用推荐