diff options
Diffstat (limited to 'include/atomic_t.h')
-rw-r--r-- | include/atomic_t.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/atomic_t.h b/include/atomic_t.h new file mode 100644 index 0000000000..e35fc187bf --- /dev/null +++ b/include/atomic_t.h @@ -0,0 +1,22 @@ +/* Copyright 2021 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* This file is to provide atomic_t definition */ + +#ifndef __CROS_EC_ATOMIC_T_H +#define __CROS_EC_ATOMIC_T_H + +#ifndef CONFIG_ZEPHYR +#ifdef TEST_BUILD +typedef int atomic_t; +#else +typedef long atomic_t; +#endif +typedef atomic_t atomic_val_t; +#else +#include <sys/atomic.h> +#endif + +#endif /* __CROS_EC_ATOMIC_T_H */ |