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
atomic.h
base64.h
byteorder.h
check.h
crc.h
device_mmio.h
dlist.h
errno_private.h
fdtable.h
kobject.h
libc-hooks.h
list_gen.h
math_extras_impl.h
math_extras.h
mem_manage.h
mempool_base.h
mempool.h
mutex.h
notify.h
onoff.h
printk.h
rb.h
ring_buffer.h
sem.h
sflist.h
slist.h
speculation.h
sys_heap.h
sys_io.h
thread_stack.h
time_units.h
timeutil.h
util_internal.h
util_macro.h
util.h