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
byteorder.h sys: byteorder: Fix incorrect shift in sys_get_be48/le48 2020-09-21 11:17:59 +02:00
check.h
crc.h
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
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
math_extras.h
mem_manage.h kernel: demote k_mem_map to z_mem_map 2020-09-03 14:24:38 -04:00
mempool_base.h
mempool.h
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
sflist.h
slist.h
speculation.h
sys_heap.h
sys_io.h
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
util_internal.h
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