diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2020-09-24 12:16:26 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-07 09:27:14 +0000 |
commit | 5abcdc389876bf4ed9069bc71e52e15c7cddca53 (patch) | |
tree | 7d68589128641e090cc4fe2e2c3d8dd8db5709c5 /core/riscv-rv32i | |
parent | 90268827732825a4c537c40a95c0ae7fb9bcc75f (diff) | |
download | chrome-ec-5abcdc389876bf4ed9069bc71e52e15c7cddca53.tar.gz |
core/riscv-rv32i: rename atomic inc and dec
Rename atomic_inc function to deprecated_atomic_read_add and atomic_dec
to deprecated_atomic_read_add to be more precise what the functions do.
It is done as a part of porting to Zephyr, where atomic_inc increments
by 1 and atomic_dec decrements by 1.
BUG=b:169151160
BRANCH=none
TEST=buildall
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: Ide852ac32ce9027698cb937a06543da689c2e136
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428944
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'core/riscv-rv32i')
-rw-r--r-- | core/riscv-rv32i/atomic.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/riscv-rv32i/atomic.h b/core/riscv-rv32i/atomic.h index db21e2a70d..7a7431b740 100644 --- a/core/riscv-rv32i/atomic.h +++ b/core/riscv-rv32i/atomic.h @@ -56,14 +56,14 @@ static inline uint32_t deprecated_atomic_read_clear(volatile uint32_t *addr) return ATOMIC_OP(and, 0, addr); } -static inline uint32_t deprecated_atomic_inc(volatile uint32_t *addr, - uint32_t value) +static inline uint32_t deprecated_atomic_read_add(volatile uint32_t *addr, + uint32_t value) { return ATOMIC_OP(add, value, addr); } -static inline uint32_t deprecated_atomic_dec(volatile uint32_t *addr, - uint32_t value) +static inline uint32_t deprecated_atomic_read_sub(volatile uint32_t *addr, + uint32_t value) { return ATOMIC_OP(add, -value, addr); } |