From 3500d0efef4d19ecddb4d4dfaab25a9c63438114 Mon Sep 17 00:00:00 2001 From: Yang XiaoHua Date: Sat, 24 Apr 2021 12:07:27 +0800 Subject: [PATCH] include:fix zephyr conflicting types and function The atomic code is implemented in zephyr. When sof is used as a zephyr module, there is no need to reimplement atomic. The modification here is to solve the problem of repeated definition of atomic related content. Signed-off-by: Yang XiaoHua --- src/include/sof/atomic.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/include/sof/atomic.h b/src/include/sof/atomic.h index 6d16b6b6c..c35fe5ffe 100644 --- a/src/include/sof/atomic.h +++ b/src/include/sof/atomic.h @@ -5,6 +5,9 @@ * Author: Liam Girdwood */ +#ifdef __ZEPHYR__ +#include +#else #ifndef __SOF_ATOMIC_H__ #define __SOF_ATOMIC_H__ @@ -37,3 +40,5 @@ static inline int32_t atomic_sub(atomic_t *a, int32_t value) } #endif /* __SOF_ATOMIC_H__ */ + +#endif /*__ZEPHYR__ */