zephyr/doc/reference/kernel/other
Andy Ross 820c94e5dd arch/xtensa: Inline atomics
The xtensa atomics layer was written with hand-coded assembly that had
to be called as functions.  That's needlessly slow, given that the low
level primitives are a two-instruction sequence.  Ideally the compiler
should see this as an inline to permit it to better optimize around
the needed barriers.

There was also a bug with the atomic_cas function, which had a loop
internally instead of returning the old value synchronously on a
failed swap.  That's benign right now because our existing spin lock
does nothing but retry it in a tight loop anyway, but it's incorrect
per spec and would have caused a contention hang with more elaborate
algorithms (for example a spinlock with backoff semantics).

Remove the old implementation and replace with a much smaller inline C
one based on just two assembly primitives.

This patch also contains a little bit of refactoring to address the
scheme has been split out into a separate header for each, and the
ATOMIC_OPERATIONS_CUSTOM kconfig has been renamed to
ATOMIC_OPERATIONS_ARCH to better capture what it means.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-03-08 11:14:27 -05:00
..
atomic.rst arch/xtensa: Inline atomics 2021-03-08 11:14:27 -05:00
cpu_idle.rst doc: reference: kernel: remove inconsistent comment for k_cpu_idle 2020-03-20 11:53:14 +01:00
cxx_support.rst
fatal.rst toolchain: common: Merge build assert macros 2020-03-31 07:18:06 +02:00
float.rst x86: rename CONFIG_SSE* to CONFIG_X86_SSE* 2021-02-15 08:21:15 -05:00
interrupts.rst doc: kernel: clarify object limits 2020-11-19 13:18:59 -05:00
polling.rst doc: update struct references to use :c:struct: 2020-08-31 09:57:33 -04:00
ring_buffers.rst doc: kernel: other: ring_buffers: Add Kconfig option description 2021-01-07 16:54:59 -05:00
version.rst