diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2022-03-04 11:54:59 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-03-10 07:32:29 +0000 |
commit | 918e0cae0b95781b25dfb77b0dfcb400a8acbdd8 (patch) | |
tree | bc5411fa0d99ae678554ac24a1f1a299263f3c50 /third_party | |
parent | 65ce6e41cec2b6eb0529d4a908ecad2a2a32b4d4 (diff) | |
download | chrome-ec-918e0cae0b95781b25dfb77b0dfcb400a8acbdd8.tar.gz |
third_party/zephyr: Adapt atomic.h for EC build environment
Remove unnecessary includes and redefinitions.
BUG=b:208435177
TEST=zmake testall & make buildall
BRANCH=none
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I50119ea67db6d7675b2cee6465b6bdccd14bc04a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3503668
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/zephyr/atomic.h | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/third_party/zephyr/atomic.h b/third_party/zephyr/atomic.h index 95d212ecfb..7b08018723 100644 --- a/third_party/zephyr/atomic.h +++ b/third_party/zephyr/atomic.h @@ -8,40 +8,27 @@ #ifndef ZEPHYR_INCLUDE_SYS_ATOMIC_H_ #define ZEPHYR_INCLUDE_SYS_ATOMIC_H_ +/* + * EC adaptation + * Remove unnecessary includes. + */ #include <stdbool.h> -#include <toolchain.h> #include <stddef.h> -#include <zephyr/types.h> -#include <sys/util_macro.h> - #ifdef __cplusplus extern "C" { #endif -typedef long atomic_t; -typedef atomic_t atomic_val_t; -typedef void *atomic_ptr_t; -typedef atomic_ptr_t atomic_ptr_val_t; - -/* Low-level primitives come in several styles: */ - -#if defined(CONFIG_ATOMIC_OPERATIONS_C) -/* Generic-but-slow implementation based on kernel locking and syscalls */ -#include <sys/atomic_c.h> -#elif defined(CONFIG_ATOMIC_OPERATIONS_ARCH) -/* Some architectures need their own implementation */ -# ifdef CONFIG_XTENSA -/* Not all Xtensa toolchains support GCC-style atomic intrinsics */ -# include <arch/xtensa/atomic_xtensa.h> -# else -/* Other arch specific implementation */ -# include <sys/atomic_arch.h> -# endif /* CONFIG_XTENSA */ -#else -/* Default. See this file for the Doxygen reference: */ -#include <sys/atomic_builtin.h> -#endif +/* + * EC adaptation + * Remove redefinition of atomic types. + */ + +/* + * EC adaptation + * Remove including basic atomic operations. + */ + /* Portable higher-level utilities: */ |