Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset dd870b1 in mainline


Ignore:
Timestamp:
2013-03-11T13:55:39Z (9 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
328cc31
Parents:
26bcc658
Message:

Add compile-time assert macro STATIC_ASSERT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/debug.h

    r26bcc658 rdd870b1  
    7777        } while (0)
    7878
     79/** Static assert macro
     80 *
     81 */
     82#define STATIC_ASSERT(expr) \
     83        _Static_assert(expr, "")
     84
     85#define STATIC_ASSERT_VERBOSE(expr, msg) \
     86        _Static_assert(expr, msg)
     87
     88
    7989#else /* CONFIG_DEBUG */
    8090
    8191#define ASSERT(expr)
    8292#define ASSERT_VERBOSE(expr, msg)
     93#define STATIC_ASSERT(expr)
     94#define STATIC_ASSERT_VERBOSE(expr, msg)
    8395
    8496#endif /* CONFIG_DEBUG */
Note: See TracChangeset for help on using the changeset viewer.