xref: /third_party/musl/porting/liteos_a/kernel/include/assert.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/porting/liteos_a/kernel/include/
1570af302Sopenharmony_ci#include <features.h>
2570af302Sopenharmony_ci
3570af302Sopenharmony_ci#undef assert
4570af302Sopenharmony_ci
5570af302Sopenharmony_ci#ifdef NDEBUG
6570af302Sopenharmony_ci#define	assert(x) (void)0
7570af302Sopenharmony_ci#else
8570af302Sopenharmony_ci#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)))
9570af302Sopenharmony_ci#endif
10570af302Sopenharmony_ci
11570af302Sopenharmony_ci#define DEBUGASSERT(x) assert(x)
12570af302Sopenharmony_ci
13570af302Sopenharmony_ci#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
14570af302Sopenharmony_ci#define static_assert _Static_assert
15570af302Sopenharmony_ci#endif
16570af302Sopenharmony_ci
17570af302Sopenharmony_ci#ifdef __cplusplus
18570af302Sopenharmony_ciextern "C" {
19570af302Sopenharmony_ci#endif
20570af302Sopenharmony_ci
21570af302Sopenharmony_ci_Noreturn void __assert_fail (const char *, const char *, int, const char *);
22570af302Sopenharmony_ci
23570af302Sopenharmony_ci#ifdef __cplusplus
24570af302Sopenharmony_ci}
25570af302Sopenharmony_ci#endif
26

Indexes created Thu Nov 07 10:32:03 CST 2024