diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-11-24 08:22:04 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-24 19:37:19 +0000 |
commit | 205d6dfafa8078aeddc797f610997545291ba679 (patch) | |
tree | c22ffc327e2efb59d77a8809d6af87b3031683dc /core/cortex-m | |
parent | f53a684921dbf7a0a1e915ddc266797cd2a63dd1 (diff) | |
download | chrome-ec-205d6dfafa8078aeddc797f610997545291ba679.tar.gz |
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 <dn@semihalf.com>
Change-Id: I80910c03051cf8bb46ef79350aed2a510b65c420
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3295567
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'core/cortex-m')
-rw-r--r-- | core/cortex-m/atomic.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/cortex-m/atomic.h b/core/cortex-m/atomic.h index e9b96f6fd5..ce183465e8 100644 --- a/core/cortex-m/atomic.h +++ b/core/cortex-m/atomic.h @@ -8,11 +8,9 @@ #ifndef __CROS_EC_ATOMIC_H #define __CROS_EC_ATOMIC_H +#include "atomic_t.h" #include "common.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); |