From 205d6dfafa8078aeddc797f610997545291ba679 Mon Sep 17 00:00:00 2001 From: Dawid Niedzwiecki Date: Wed, 24 Nov 2021 08:22:04 +0100 Subject: atomic: extract atomic_t to a separated file Move the atomic_t definition to a separated file, common for all cores. It will be useful for removing include loops in incoming commits related to modifying atomic_t caused by a change in Zephyr upstream (atomic_t from int to long). For Zephyr, just include atomic.h which doesn't have any dependencies. BUG=b:207082842 TEST=make buildall && zmake testall && build_compare.sh -b all BRANCH=main Signed-off-by: Dawid Niedzwiecki Change-Id: I80910c03051cf8bb46ef79350aed2a510b65c420 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3295567 Reviewed-by: Keith Short Commit-Queue: Keith Short --- core/riscv-rv32i/atomic.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/riscv-rv32i/atomic.h') diff --git a/core/riscv-rv32i/atomic.h b/core/riscv-rv32i/atomic.h index e92beb2ca0..91658e8065 100644 --- a/core/riscv-rv32i/atomic.h +++ b/core/riscv-rv32i/atomic.h @@ -8,13 +8,11 @@ #ifndef __CROS_EC_ATOMIC_H #define __CROS_EC_ATOMIC_H +#include "atomic_t.h" #include "common.h" #include "cpu.h" #include "task.h" -typedef int atomic_t; -typedef atomic_t atomic_val_t; - static inline atomic_val_t atomic_clear_bits(atomic_t *addr, atomic_val_t bits) { return __atomic_fetch_and(addr, ~bits, __ATOMIC_SEQ_CST); -- cgit v1.2.1