zephyr/include/sys
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
..
__assert.h assert: Completely remove file info and condition expression 2020-01-13 13:59:55 +01:00
arch_interface.h arch: tests: Document interrupt delivery behavior after arch_irq_disable() 2021-01-21 17:50:01 -05:00
atomic_builtin.h arch/xtensa: Inline atomics 2021-03-08 11:14:27 -05:00
atomic_c.h arch/xtensa: Inline atomics 2021-03-08 11:14:27 -05:00
atomic.h arch/xtensa: Inline atomics 2021-03-08 11:14:27 -05:00
base64.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
byteorder.h sys: byteorder: Fix incorrect shift in sys_get_be48/le48 2020-09-21 11:17:59 +02:00
cbprintf.h lib: cbprintf: add support for deferred formatting 2021-03-05 09:29:35 +01:00
check.h base: add error checking macros 2020-01-20 17:19:54 -05:00
crc.h lib: os: Introduce support for CRC32C algorithm 2021-03-02 14:08:30 +01:00
device_mmio.h mmu: rename z_mem_map to z_phys_map 2020-12-16 08:55:55 -05:00
dlist.h sys: tell compiler about impossible aliasing in dlist APIs 2021-03-02 19:39:24 -05:00
errno_private.h kernel: support using thread local storage for errno 2020-10-24 10:52:00 -07:00
fdtable.h net: getsockname: Call via vtable instead of ioctl 2020-08-14 09:47:51 -07:00
kobject.h kernel: userspace: aligned memory allocation for dynamic objects 2021-01-13 09:43:55 -08:00
libc-hooks.h arm: cortex_m: add support for thread local storage 2020-10-24 10:52:00 -07:00
list_gen.h
math_extras_impl.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
math_extras.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
mem_manage.h mmu: promote public APIs 2021-01-23 19:47:23 -05:00
mutex.h doc: Fix sys_mutex and futex missing documentation 2021-02-02 14:01:57 -05:00
notify.h code-guideline: Fixing code violation 10.4 Rule 2020-10-01 17:13:29 -04:00
onoff.h code-guideline: Fixing code violation 10.4 Rule 2020-10-01 17:13:29 -04:00
p4wq.h lib/os: P4 Work Queue: Pooled Parallel Preemptible Priority-based 2021-01-15 11:35:50 -05:00
printk.h lib/os: replace z_vprintk with cbprintf 2020-11-13 06:38:01 -05:00
rb.h
ring_buffer.h lib: os: ring_buffer: Cleaning checkpatch warnings 2020-11-11 13:17:49 +01:00
sem.h linker: add iterable section macros 2020-06-24 17:09:22 -04:00
sflist.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
slist.h
speculation.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
sys_heap.h lib/os/heap: add alignment precisions to the documentation 2021-02-02 19:08:24 -05:00
sys_io.h sys_io: Expand the API to 64bits read/write functions 2020-12-08 09:29:20 -05:00
thread_stack.h kernel/include: Put kernel stack memory in the right memory 2021-02-11 14:47:40 -05:00
time_units.h code-guideline: Fixing code violation 10.4 Rule 2020-10-01 17:13:29 -04:00
timeutil.h doc: add a section for timeutil APIs 2021-01-20 16:38:56 -05:00
util_internal.h sys: util: Update implementation of loop macros 2021-02-28 16:46:44 -05:00
util_loops.h sys: util: Update implementation of loop macros 2021-02-28 16:46:44 -05:00
util_macro.h sys: util: Update implementation of loop macros 2021-02-28 16:46:44 -05:00
util.h sys: util: add BIT64_MASK 2020-11-13 06:38:01 -05:00