zephyr/tests/kernel
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
..
arm_irq_vector_table all: Update reserved function names 2019-03-11 13:48:42 -04:00
arm_runtime_nmi cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
boot_page_table x86: modify MMU APIs for multiple page tables 2019-02-14 12:46:36 -05:00
common kernel: fix atomic ops in user mode on some arches 2019-03-18 09:18:00 -04:00
context tests: kernel: context: Fix build issue with RV32M1_LPTMR_TIMER 2019-03-13 17:02:05 -05:00
critical tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
device device: Extend device_set_power_state API to support async requests 2019-03-14 14:26:15 +01:00
early_sleep tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
fatal all: Update reserved function names 2019-03-11 13:48:42 -04:00
fifo tests/kernel/fifo/fifo_usage: Disable SMP 2019-03-15 19:42:59 +01:00
fp_sharing all: Update reserved function names 2019-03-11 13:48:42 -04:00
gen_isr_table all: Update reserved function names 2019-03-11 13:48:42 -04:00
interrupt all: Update reserved function names 2019-03-11 13:48:42 -04:00
lifo m2gl025_miv: Ignore lifo_usage tests 2019-03-04 12:39:09 -05:00
mbox tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
mem_heap/mheap_api_concept cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
mem_pool tests/kernel/mem_pool/mem_pool_threadsafe: Reduce tick rate 2019-03-15 05:50:43 +01:00
mem_protect all: Update reserved function names 2019-03-11 13:48:42 -04:00
mem_slab tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
mp all: Update reserved function names 2019-03-11 13:48:42 -04:00
msgq/msgq_api tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
mutex tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
obj_tracing tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
pending tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
pipe all: Update reserved function names 2019-03-11 13:48:42 -04:00
poll tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
profiling/profiling_api power: rename CPU_LPS_n power states 2019-02-26 02:30:13 +01:00
queue tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
sched all: Update reserved function names 2019-03-11 13:48:42 -04:00
semaphore macros: deleted macros SECONDS(), MSEC(), USEC() 2019-03-04 19:04:21 -05:00
sleep all: Update reserved function names 2019-03-11 13:48:42 -04:00
smp tests/kernel/smp: Clean up "guess waiting" on SMP thread exit 2019-03-13 19:15:20 +01:00
spinlock all: Update reserved function names 2019-03-11 13:48:42 -04:00
stack tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
static_idt cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
threads all: Update reserved function names 2019-03-11 13:48:42 -04:00
tickless all: Update reserved function names 2019-03-11 13:48:42 -04:00
timer tests/timer_api: revert testcase configuration 2019-03-01 14:53:33 -08:00
workq all: Update reserved function names 2019-03-11 13:48:42 -04:00
xip tests/xip: exclude Minnowboard from test (does not do XIP) 2019-03-07 20:31:31 -05:00