Skip to content

Commit f9a8623

Browse files
committed
8.1.2a
1 parent 2579f10 commit f9a8623

46 files changed

Lines changed: 1957 additions & 1664 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples

Submodule examples updated 57 files

include/qp.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ typedef struct QEvt {
105105
} QEvt;
106106

107107
#define QEVT_INITIALIZER(sig_) { \
108-
.sig = (QSignal)(sig_), \
109-
.poolNum_ = 0x00U, \
110-
.refCtr_ = 0xE0U, \
111-
.filler_ = 0xE0E0E0E0U }
108+
(QSignal)(sig_), \
109+
(uint8_t)0x00U, \
110+
(uint8_t)0xE0U, \
111+
(uint32_t)0xE0E0E0E0U }
112112

113113
//! @public @memberof QEvt
114114
void QEvt_ctor(QEvt * const me, enum_t const sig);

include/qsafe.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,14 @@
115115
void Q_assert_(char (*Q_static_assert_error)[(expr_) ? 1 : -1])
116116
#endif
117117

118+
//============================================================================
118119
//! @cond INTERNAL
119120
#ifndef Q_NORETURN
120-
#define Q_NORETURN _Noreturn void
121+
#ifdef __cplusplus
122+
#define Q_NORETURN [[ noreturn ]] void
123+
#else
124+
#define Q_NORETURN _Noreturn void
125+
#endif
121126
#endif
122127

123128
// Is this header file used outside QP?

ports/arm-cm/qk/armclang/qp_port.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@
3434
#include <stddef.h> // size_t type ISO/IEC 9899:1990 Standard
3535
#include "qp_config.h" // QP configuration from the application
3636

37-
// no-return function specifier (C11 Standard)
38-
#define Q_NORETURN _Noreturn void
37+
#ifdef __cplusplus
38+
// no-return function specifier (C++11 Standard)
39+
#define Q_NORETURN [[ noreturn ]] void
3940

40-
// static assertion (C11 Standard)
41-
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
41+
// static assertion (C++11 Standard)
42+
#define Q_ASSERT_STATIC(expr_) static_assert((expr_), "QP static assert")
43+
#else
44+
// no-return function specifier (C11 Standard)
45+
#define Q_NORETURN _Noreturn void
46+
47+
// static assertion (C11 Standard)
48+
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
49+
#endif
4250

4351
// QF configuration for QK -- data members of the QActive class...
4452

ports/arm-cm/qk/gnu/qp_port.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@
3434
#include <stddef.h> // size_t type ISO/IEC 9899:1990 Standard
3535
#include "qp_config.h" // QP configuration from the application
3636

37-
// no-return function specifier (C11 Standard)
38-
#define Q_NORETURN _Noreturn void
37+
#ifdef __cplusplus
38+
// no-return function specifier (C++11 Standard)
39+
#define Q_NORETURN [[ noreturn ]] void
3940

40-
// static assertion (C11 Standard)
41-
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
41+
// static assertion (C++11 Standard)
42+
#define Q_ASSERT_STATIC(expr_) static_assert((expr_), "QP static assert")
43+
#else
44+
// no-return function specifier (C11 Standard)
45+
#define Q_NORETURN _Noreturn void
46+
47+
// static assertion (C11 Standard)
48+
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
49+
#endif
4250

4351
// QF configuration for QK -- data members of the QActive class...
4452

ports/arm-cm/qk/iar/qp_port.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,19 @@
3535
#include <intrinsics.h> // IAR intrinsic functions
3636
#include "qp_config.h" // QP configuration from the application
3737

38-
// no-return function specifier (C11 Standard)
39-
#define Q_NORETURN _Noreturn void
38+
#ifdef __cplusplus
39+
// no-return function specifier (C++11 Standard)
40+
#define Q_NORETURN [[ noreturn ]] void
4041

41-
// static assertion (C11 Standard)
42-
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
42+
// static assertion (C++11 Standard)
43+
#define Q_ASSERT_STATIC(expr_) static_assert((expr_), "QP static assert")
44+
#else
45+
// no-return function specifier (C11 Standard)
46+
#define Q_NORETURN _Noreturn void
47+
48+
// static assertion (C11 Standard)
49+
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
50+
#endif
4351

4452
// QF configuration for QK -- data members of the QActive class...
4553

ports/arm-cm/qv/armclang/qp_port.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@
3434
#include <stddef.h> // size_t type ISO/IEC 9899:1990 Standard
3535
#include "qp_config.h" // QP configuration from the application
3636

37-
// no-return function specifier (C11 Standard)
38-
#define Q_NORETURN _Noreturn void
37+
#ifdef __cplusplus
38+
// no-return function specifier (C++11 Standard)
39+
#define Q_NORETURN [[ noreturn ]] void
3940

40-
// static assertion (C11 Standard)
41-
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
41+
// static assertion (C++11 Standard)
42+
#define Q_ASSERT_STATIC(expr_) static_assert((expr_), "QP static assert")
43+
#else
44+
// no-return function specifier (C11 Standard)
45+
#define Q_NORETURN _Noreturn void
46+
47+
// static assertion (C11 Standard)
48+
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
49+
#endif
4250

4351
// QF configuration for QV -- data members of the QActive class...
4452

ports/arm-cm/qv/gnu/qp_port.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@
3434
#include <stddef.h> // size_t type ISO/IEC 9899:1990 Standard
3535
#include "qp_config.h" // QP configuration from the application
3636

37-
// no-return function specifier (C11 Standard)
38-
#define Q_NORETURN _Noreturn void
37+
#ifdef __cplusplus
38+
// no-return function specifier (C++11 Standard)
39+
#define Q_NORETURN [[ noreturn ]] void
3940

40-
// static assertion (C11 Standard)
41-
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
41+
// static assertion (C++11 Standard)
42+
#define Q_ASSERT_STATIC(expr_) static_assert((expr_), "QP static assert")
43+
#else
44+
// no-return function specifier (C11 Standard)
45+
#define Q_NORETURN _Noreturn void
46+
47+
// static assertion (C11 Standard)
48+
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
49+
#endif
4250

4351
// QF configuration for QV -- data members of the QActive class...
4452

ports/arm-cm/qv/iar/qp_port.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,19 @@
3535
#include <intrinsics.h> // IAR intrinsic functions
3636
#include "qp_config.h" // QP configuration from the application
3737

38-
// no-return function specifier (C11 Standard)
39-
#define Q_NORETURN _Noreturn void
38+
#ifdef __cplusplus
39+
// no-return function specifier (C++11 Standard)
40+
#define Q_NORETURN [[ noreturn ]] void
4041

41-
// static assertion (C11 Standard)
42-
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
42+
// static assertion (C++11 Standard)
43+
#define Q_ASSERT_STATIC(expr_) static_assert((expr_), "QP static assert")
44+
#else
45+
// no-return function specifier (C11 Standard)
46+
#define Q_NORETURN _Noreturn void
47+
48+
// static assertion (C11 Standard)
49+
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
50+
#endif
4351

4452
// QF configuration for QV -- data members of the QActive class...
4553

ports/arm-cr/qk/gnu/qp_port.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@
3434
#include <stddef.h> // size_t type ISO/IEC 9899:1990 Standard
3535
#include "qp_config.h" // QP configuration from the application
3636

37-
// no-return function specifier (C11 Standard)
38-
#define Q_NORETURN _Noreturn void
37+
#ifdef __cplusplus
38+
// no-return function specifier (C++11 Standard)
39+
#define Q_NORETURN [[ noreturn ]] void
3940

40-
// static assertion (C11 Standard)
41-
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
41+
// static assertion (C++11 Standard)
42+
#define Q_ASSERT_STATIC(expr_) static_assert((expr_), "QP static assert")
43+
#else
44+
// no-return function specifier (C11 Standard)
45+
#define Q_NORETURN _Noreturn void
46+
47+
// static assertion (C11 Standard)
48+
#define Q_ASSERT_STATIC(expr_) _Static_assert((expr_), "QP static assert")
49+
#endif
4250

4351
// QF configuration for QK -- data members of the QActive class...
4452

0 commit comments

Comments
 (0)