QP/C++  8.0.2
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qsafe.h File Reference

Go to the source code of this file.

Macros

#define QF_CRIT_STAT
 
#define QF_CRIT_ENTRY()
 
#define QF_CRIT_EXIT()
 
#define Q_ASSERT_INCRIT(id_, expr_)
 
#define Q_ERROR_INCRIT(id_)
 
#define Q_ASSERT_ID(id_, expr_)
 
#define Q_ERROR_ID(id_)
 
#define Q_ASSERT(expr_)
 
#define Q_ERROR()
 
#define Q_REQUIRE_ID(id_, expr_)
 
#define Q_REQUIRE(expr_)
 
#define Q_REQUIRE_INCRIT(id_, expr_)
 
#define Q_ENSURE_ID(id_, expr_)
 
#define Q_ENSURE(expr_)
 
#define Q_ENSURE_INCRIT(id_, expr_)
 
#define Q_INVARIANT_ID(id_, expr_)
 
#define Q_INVARIANT(expr_)
 
#define Q_INVARIANT_INCRIT(id_, expr_)
 
#define Q_ASSERT_STATIC(expr_)
 
#define Q_NORETURN   _Noreturn void
 
#define Q_DIM(array_)
 

Functions

Q_NORETURN Q_onError (char const *const module, int_t const id)
 

Macro Definition Documentation

◆ QF_CRIT_STAT

#define QF_CRIT_STAT

Definition at line 36 of file qsafe.h.

◆ QF_CRIT_ENTRY

#define QF_CRIT_ENTRY ( )
Value:
((void)0)

Definition at line 40 of file qsafe.h.

◆ QF_CRIT_EXIT

#define QF_CRIT_EXIT ( )
Value:
((void)0)

Definition at line 44 of file qsafe.h.

◆ Q_ASSERT_INCRIT

#define Q_ASSERT_INCRIT ( id_,
expr_ )
Value:
((expr_) ? ((void)0) : Q_onError(&Q_this_module_[0], (id_)))
Q_NORETURN Q_onError(char const *const module, int_t const id)

Definition at line 50 of file qsafe.h.

◆ Q_ERROR_INCRIT

#define Q_ERROR_INCRIT ( id_)
Value:
(Q_onError(&Q_this_module_[0], (id_)))

Definition at line 53 of file qsafe.h.

◆ Q_ASSERT_ID

#define Q_ASSERT_ID ( id_,
expr_ )
Value:
do { \
QF_CRIT_STAT \
QF_CRIT_ENTRY(); \
(expr_) ? ((void)0) : Q_onError(&Q_this_module_[0], (id_)); \
QF_CRIT_EXIT(); \
} while (false)

Definition at line 56 of file qsafe.h.

◆ Q_ERROR_ID

#define Q_ERROR_ID ( id_)
Value:
do { \
QF_CRIT_STAT \
QF_CRIT_ENTRY(); \
Q_onError(&Q_this_module_[0], (id_)); \
QF_CRIT_EXIT(); \
} while (false)

Definition at line 63 of file qsafe.h.

◆ Q_ASSERT

#define Q_ASSERT ( expr_)
Value:
Q_ASSERT_ID(__LINE__, (expr_))
#define Q_ASSERT_ID(id_, expr_)
Definition qsafe.h:56

Definition at line 83 of file qsafe.h.

◆ Q_ERROR

#define Q_ERROR ( )
Value:
Q_ERROR_ID(__LINE__)
#define Q_ERROR_ID(id_)
Definition qsafe.h:63

Definition at line 84 of file qsafe.h.

◆ Q_REQUIRE_ID

#define Q_REQUIRE_ID ( id_,
expr_ )
Value:
Q_ASSERT_ID((id_), (expr_))

Definition at line 85 of file qsafe.h.

◆ Q_REQUIRE

#define Q_REQUIRE ( expr_)
Value:
Q_ASSERT(expr_)
#define Q_ASSERT(expr_)
Definition qsafe.h:83

Definition at line 86 of file qsafe.h.

◆ Q_REQUIRE_INCRIT

#define Q_REQUIRE_INCRIT ( id_,
expr_ )
Value:
Q_ASSERT_INCRIT((id_), (expr_))
#define Q_ASSERT_INCRIT(id_, expr_)
Definition qsafe.h:50

Definition at line 87 of file qsafe.h.

◆ Q_ENSURE_ID

#define Q_ENSURE_ID ( id_,
expr_ )
Value:
Q_ASSERT_ID((id_), (expr_))

Definition at line 88 of file qsafe.h.

◆ Q_ENSURE

#define Q_ENSURE ( expr_)
Value:
Q_ASSERT(expr_)

Definition at line 89 of file qsafe.h.

◆ Q_ENSURE_INCRIT

#define Q_ENSURE_INCRIT ( id_,
expr_ )
Value:
Q_ASSERT_INCRIT((id_), (expr_))

Definition at line 90 of file qsafe.h.

◆ Q_INVARIANT_ID

#define Q_INVARIANT_ID ( id_,
expr_ )
Value:
Q_ASSERT_ID((id_), (expr_))

Definition at line 91 of file qsafe.h.

◆ Q_INVARIANT

#define Q_INVARIANT ( expr_)
Value:
Q_ASSERT(expr_)

Definition at line 92 of file qsafe.h.

◆ Q_INVARIANT_INCRIT

#define Q_INVARIANT_INCRIT ( id_,
expr_ )
Value:
Q_ASSERT_INCRIT((id_), (expr_))

Definition at line 93 of file qsafe.h.

◆ Q_ASSERT_STATIC

#define Q_ASSERT_STATIC ( expr_)
Value:
extern char Q_static_assert_[(expr_) ? 1 : -1]

Definition at line 96 of file qsafe.h.

◆ Q_NORETURN

#define Q_NORETURN   _Noreturn void

Definition at line 100 of file qsafe.h.

◆ Q_DIM

#define Q_DIM ( array_)
Value:
(sizeof(array_) / sizeof((array_)[0U]))

Definition at line 105 of file qsafe.h.

Function Documentation

◆ Q_onError()

Q_NORETURN Q_onError ( char const *const module,
int_t const id )