diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2020-10-05 09:56:35 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-13 11:02:03 +0000 |
commit | 44435d3b9c447ad25edaa8aece42f1cff0dd6df9 (patch) | |
tree | 918144099242bc536c026c1948bfdd7084a5c33f /chip/npcx/build.mk | |
parent | f471709ee0bd4f02f62eac6efb25a9656ec70ea9 (diff) | |
download | chrome-ec-44435d3b9c447ad25edaa8aece42f1cff0dd6df9.tar.gz |
core/minute-ia: add Zephyr compatible atomic functions
Add atomic functions with prototypes equal to the ones in Zephyr.
It is done as a part of porting to Zephyr, the next step is to use in
the code atomic_* instead of deprecated_atomic_*.
Some atomic functions in Zephyr return a value e.g. atomic_add - it
returns the value of the variable before the add operation.
The current state of ATOMIC_OP macro is not designed to return such value
so instead of reworking it or writing new custom asm code just use
builtin functions.
The __atomic_* builtins support variables with different sizes so use
them in *_u8 functions as well.
For "and" operation, it compiles to "andb" for u8 and to "andl" for u32.
BUG=b:169151160
BRANCH=none
TEST=buildall
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I498ca3dbb14aea6afc2f7a525c530eede7f31fe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2448497
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/npcx/build.mk')
0 files changed, 0 insertions, 0 deletions