24#ifndef PARAM_ASSERTIONS_ENABLE_ALL
25#define PARAM_ASSERTIONS_ENABLE_ALL 0
28#ifndef PARAM_ASSERTIONS_DISABLE_ALL
29#define PARAM_ASSERTIONS_DISABLE_ALL 0
32#define PARAM_ASSERTIONS_ENABLED(x) ((PARAM_ASSERTIONS_ENABLED_ ## x || PARAM_ASSERTIONS_ENABLE_ALL) && !PARAM_ASSERTIONS_DISABLE_ALL)
34#define invalid_params_if(x, test) ({if (PARAM_ASSERTIONS_ENABLED(x)) assert(!(test));})
35#define valid_params_if(x, test) ({if (PARAM_ASSERTIONS_ENABLED(x)) assert(test);})
36#define hard_assert_if(x, test) ({if (PARAM_ASSERTIONS_ENABLED(x)) hard_assert(!(test));})
37#define invalid_params_if_and_return(x, test, rc) ({if (PARAM_ASSERTIONS_ENABLED(x)) assert(!(test)); if (test) return rc; })
51static inline void hard_assert(
bool condition, ...) {
56#define hard_assert assert
void __weak hard_assertion_failure(void)
Handle a hard_assert condition failure.
Definition runtime.c:20