zephyr/include/toolchain
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
..
common.h ARC: make the assembly codes compatible 2020-09-05 10:22:56 -05:00
gcc.h sys: util: Add clamp macro 2020-11-05 12:12:17 +01:00
mwdt.h toolchain: define __no_optimization attribute across toolchains 2020-10-06 11:41:23 -04:00
xcc_missing_defs.h toolchain/xcc: augment compiler provided macros to match gcc and clang 2019-07-03 06:09:16 -04:00
xcc.h toolchain: xcc: use Clang if exists 2020-01-07 17:09:38 +01:00
zephyr_stdint.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00