PatchworkOS
Loading...
Searching...
No Matches
assert.h File Reference
#include "_internal/config.h"

Go to the source code of this file.

Macros

#define _SYMBOL2STRING(x)   #x
 
#define _VALUE2STRING(x)   _SYMBOL2STRING(x)
 
#define assert(expression)   ((expression) ? (void)0 : _assert_89("Assertion failed: " #expression " file " __FILE__ "."))
 

Functions

_PUBLIC void _assert_99 (const char *const, const char *const, const char *const)
 
_PUBLIC void _assert_89 (const char *const)
 

Macro Definition Documentation

◆ _SYMBOL2STRING

#define _SYMBOL2STRING (   x)    #x

Definition at line 17 of file assert.h.

◆ _VALUE2STRING

#define _VALUE2STRING (   x)    _SYMBOL2STRING(x)

Definition at line 18 of file assert.h.

◆ assert

#define assert (   expression)    ((expression) ? (void)0 : _assert_89("Assertion failed: " #expression " file " __FILE__ "."))

Definition at line 29 of file assert.h.

Function Documentation

◆ _assert_89()

_PUBLIC void _assert_89 ( const char * const  message)

Definition at line 23 of file assert.c.

References abort(), fputs(), NULL, panic(), and stderr.

◆ _assert_99()

_PUBLIC void _assert_99 ( const char * const  message1,
const char * const  function,
const char * const  message2 
)

Definition at line 11 of file assert.c.

References abort(), errno, fputs(), NULL, panic(), stderr, and strerror().