atomic:support ATOMIC_VAR_INIT in others platform
Summary: This change mainly appears in the compilation environment of MVSC Since MVSC supports the c++11 standard in VS2019 preview3 (https://en.cppreference.com/w/cpp/compiler_support/11), we can do static initialization using the c++11 approach atomic_int a = 1 Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
900e713cd0
commit
aade7c7c2d
@ -80,6 +80,9 @@ extern "C++"
|
||||
# endif
|
||||
# include <stdbool.h>
|
||||
# include <stdatomic.h>
|
||||
# ifndef ATOMIC_VAR_INIT
|
||||
# define ATOMIC_VAR_INIT(value) (value)
|
||||
# endif
|
||||
# else
|
||||
# include <nuttx/lib/stdatomic.h>
|
||||
# endif
|
||||
|
Loading…
Reference in New Issue
Block a user