zephyr/tests/kernel/common
Andrew Boie b3eb510f5c kernel: fix atomic ops in user mode on some arches
Most CPUs have instructions like LOCK, LDREX/STREX, etc which
allows for atomic operations without locking interrupts that
can be invoked from user mode without complication. They typically
use compiler builtin atomic operations, or custom assembly
to implement them.

However, some CPUs may lack these kinds of instructions, such
as Cortex-M0 or some ARC. They use these C-based atomic
operation implementations instead. Unfortunately these require
grabbing a spinlock to ensure proper concurrency with other
threads and ISRs. Hence, they will trigger an exception when
called from user mode.

For these platforms, which support user mode but not atomic
operation instructions, the atomic API has been exposed as
system calls.

Some of the implementations in atomic_c.c which can be instead
expressed in terms of other atomic operations have been removed.

The kernel test of atomic operations now runs in user mode to
prove that this works.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-18 09:18:00 -04:00
..
src kernel: fix atomic ops in user mode on some arches 2019-03-18 09:18:00 -04:00
CMakeLists.txt tests: common: move irq_offload test to common 2019-02-05 20:40:07 -05:00
multilib.txt
prj.conf tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
testcase.yaml lib/os: Conditionally eliminate alloca/VLA usage 2019-02-28 10:06:35 -08:00