AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
assert.h File Reference

Go to the source code of this file.

Macros

#define assert(x)
#define assert_sizeof(o, sz)
#define assert_alignof(o, al)

Macro Definition Documentation

◆ assert

#define assert ( x)
Value:
do { \
if (!(x)) \
panic("Assertion " #x " failed"); \
} while (0)

Definition at line 9 of file assert.h.

◆ assert_alignof

#define assert_alignof ( o,
al )
Value:
do { \
if (((uintptr_t) o) & (al - 1)) \
panic("Assertion alignof(" #o ") == " #al " failed"); \
} while (0)
__SIZE_TYPE__ uintptr_t
Definition stddef.h:12

Definition at line 21 of file assert.h.

Referenced by x86_fpu_init(), and x86_gdt_setup().

◆ assert_sizeof

#define assert_sizeof ( o,
sz )
Value:
do { \
if (sizeof(o) != sz) \
panic("Assertion sizeof(" #o ") == " #sz " failed"); \
} while (0)

Definition at line 15 of file assert.h.

Referenced by x86_gdt_setup().