zephyr/include/sys
Trond Einar Snekvik ed1f75da74 sys: util: Add clamp macro
Adds CLAMP macro to complement the current min/max macros, as well as a
gcc specific Z_CLAMP macro for single-evaluation expansion.

CLAMP combines the functionality of MIN and MAX, eliminating the
bug-prone usage of MIN(MAX(value, FLOOR), CEIL) found throughout the
codebase in every possible combination.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-11-05 12:12:17 +01:00
..
__assert.h
arch_interface.h arch_interface: update arch_mem_domain_thread_add 2020-10-22 16:47:07 -07:00
atomic.h code-guideline: Fixing code violation 10.4 Rule 2020-10-01 17:13:29 -04: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
check.h
crc.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
device_mmio.h kernel: demote k_mem_map to z_mem_map 2020-09-03 14:24:38 -04:00
dlist.h
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: move kernel object APIs to own header 2020-10-12 12:21:46 -04: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 kernel: demote k_mem_map to z_mem_map 2020-09-03 14:24:38 -04:00
mempool_base.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
mempool.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
mutex.h include: sys: use C linkage 2020-10-22 07:49:07 -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
printk.h
rb.h
ring_buffer.h sys: ring_buffer: remove deprecated macros 2020-10-06 14:58:42 -04: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: debugging facility to dump the heap structure to the cconsole 2020-06-26 11:41:43 -07:00
sys_io.h sys/sys_io.h: Memory mapped I/O APIs must be pointer-sized, not 32 bit! 2020-07-08 12:34:09 +02:00
thread_stack.h kernel: Add cache coherence management framework 2020-10-21 06:38:53 -04:00
time_units.h code-guideline: Fixing code violation 10.4 Rule 2020-10-01 17:13:29 -04:00
timeutil.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
util_internal.h sys/util: fix macro support when building with C++ 2020-08-12 16:39:37 -05:00
util_macro.h doc: allow macro resolving in \deprecated usage 2020-10-27 13:09:24 +01:00
util.h sys: util: Add clamp macro 2020-11-05 12:12:17 +01:00