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 <yangxiaohuamail@gmail.com>
This commit is contained in:
Yang XiaoHua 2021-04-24 12:07:27 +08:00 committed by Liam Girdwood
parent b500999477
commit 3500d0efef
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,9 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifdef __ZEPHYR__
#include <sys/atomic.h>
#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__ */