summaryrefslogtreecommitdiff
path: root/test/battery_get_params_smart.c
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2020-09-28 15:43:55 +0200
committerCommit Bot <commit-bot@chromium.org>2020-10-15 13:03:19 +0000
commitd31a8e4b5ac2def50650690a76cb13c3ec834bae (patch)
tree26fb27b1fc06a617758d109905de1b3f23bea3c6 /test/battery_get_params_smart.c
parent92f55b092e0a8b00496db89e3d129932aae0525a (diff)
downloadchrome-ec-d31a8e4b5ac2def50650690a76cb13c3ec834bae.tar.gz
core/cortex-m0: 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. To support such functionality the new ATOMIC_OP define is introduced. The "memory" clobber is added to the asm statement to inform compiler that memory pointed by the input parameter (a) is changed. This is needed, because atomic_* functions are inline. GCC builtin functions are not used, because those functions are not available for cortex-m0. BUG=b:169151160 BRANCH=none TEST=buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I713daf388cb279704ae1b3767bd84b71a255f7cd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2438425 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'test/battery_get_params_smart.c')
0 files changed, 0 insertions, 0 deletions