zephyr/include/misc
Andy Ross 5bc458a0fa util.h: Add IS_ENABLED() macro for expression-legal ifdef-checking
This trick was pioneered in Linux as the config_enabled() macro.  The
madness has the effect of taking a macro value that may be defined to
"1" (e.g. CONFIG_MYFEATURE), or may not be defined at all and turning
it into a literal expression that can be used at "runtime".  That is,
it works similarly to "defined(CONFIG_MYFEATURE)" does except that it
is an expansion that can exist in a standard expression and be seen by
the compiler and optimizer.  Thus much #ifdef usage can be replaced
with cleaner expressions like:

    if (IS_ENABLED(CONFIG_MYFEATURE))
            myfeature_enable();

Change-Id: I40657d2aa3f802429ac33675a1fe245a5da86615
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-01-11 23:32:32 +00:00
..
__assert.h __assert.h: format strings are not optional 2016-07-20 23:40:48 +00:00
byteorder.h misc/byteorder: Use the right data-type 2016-12-21 12:54:48 +00:00
dlist.h dlist: add sys_dlist_peek_tail() 2017-01-06 17:32:25 +00:00
nano_work.h include: remove old kernel defintions 2016-11-07 11:32:57 -08:00
printk.h printk: Add ARG_UNUSED macro 2016-12-24 15:23:38 +00:00
reboot.h c++: Add extern "C" { } block to header files 2016-02-05 20:25:22 -05:00
ring_buffer.h kernel: remove last nanokernel ocrrurances from include/ 2016-12-25 14:34:43 -05:00
slist.h slist: add static initialization macro 2016-10-01 01:36:38 +00:00
stack.h kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
util.h util.h: Add IS_ENABLED() macro for expression-legal ifdef-checking 2017-01-11 23:32:32 +00:00