zephyr/doc/reference/kernel
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
..
data_passing doc: kernel: clarify object limits 2020-11-19 13:18:59 -05:00
memory heap: clean up some size related issues 2021-01-15 12:08:20 -05:00
other arch/xtensa: Inline atomics 2021-03-08 11:14:27 -05:00
scheduling doc: kernel: add sleep as a defined term 2021-02-02 12:05:29 -05:00
smp doc/kernel/smp: Add initialization diagram 2019-11-14 19:13:27 -05:00
synchronization doc: fix typo in condvar documentation 2021-02-10 11:57:59 -05:00
threads doc: kernel: workqueue: update for new workqueue API 2021-03-03 20:06:00 -05:00
timing doc: add a section for timeutil APIs 2021-01-20 16:38:56 -05:00
index.rst doc: add documentation for condition variables 2021-01-19 08:55:47 -05:00