7.4.0-rc.2

This commit is contained in:
MMS 2024-06-12 16:30:04 -04:00
parent daa8c78da4
commit 9f079e60e7
53 changed files with 304 additions and 181 deletions

@ -1 +1 @@
Subproject commit 054cd1abe4b4abef5e45f36b1ce8f2aff4575494
Subproject commit a0b274a334955b78bd837c8c47ee6ccb314b2c35

@ -1 +1 @@
Subproject commit 0537a180ce504ab971b26491c9bf945e4b711b4a
Subproject commit aeb634ba4e430d2e69814d80cea0d7cddc568957

View File

@ -72,6 +72,14 @@
//! @deprecated plain 'char' is no longer forbidden in MISRA/AUTOSAR-C++
using char_t = char;
//! @deprecated module name definition
//! Use Q_THIS_MODULE(name_) ended with a semicolon ';'
#define Q_DEFINE_THIS_MODULE(name_) Q_THIS_MODULE(name_);
//! @deprecated file name definition
//! Use Q_THIS_FILE() ended with a semicolon ';'
#define Q_DEFINE_THIS_FILE Q_THIS_FILE();
//! @deprecated assertion failure handler
//! Use Q_onError() instead.
#define Q_onAssert(module_, id_) Q_onError(module_, id_)

View File

@ -64,9 +64,9 @@ extern "C" {
//$declare${QP-FuSa::enabled} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${QP-FuSa::enabled::Q_DEFINE_THIS_MODULE} ..................................
#define Q_DEFINE_THIS_MODULE(name_) \
static char const Q_this_module_[] = name_;
//${QP-FuSa::enabled::Q_THIS_MODULE} .........................................
#define Q_THIS_MODULE(name_) \
static char const Q_this_module_[] = name_
//${QP-FuSa::enabled::Q_ASSERT_INCRIT} .......................................
#define Q_ASSERT_INCRIT(id_, expr_) \
@ -97,8 +97,8 @@ extern "C" {
#else
//$declare${QP-FuSa::disabled} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${QP-FuSa::disabled::Q_DEFINE_THIS_MODULE} .................................
#define Q_DEFINE_THIS_MODULE(name_)
//${QP-FuSa::disabled::Q_THIS_MODULE} ........................................
#define Q_THIS_MODULE(name_) extern char Q_this_module_
//${QP-FuSa::disabled::Q_ASSERT_INCRIT} ......................................
#define Q_ASSERT_INCRIT(id_, expr_) ((void)0)
@ -117,8 +117,8 @@ extern "C" {
//============================================================================
//$declare1${QP-FuSa} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${QP-FuSa::Q_DEFINE_THIS_FILE} .............................................
#define Q_DEFINE_THIS_FILE Q_DEFINE_THIS_MODULE(__FILE__)
//${QP-FuSa::Q_THIS_FILE} ....................................................
#define Q_THIS_FILE() Q_THIS_MODULE(__FILE__)
//${QP-FuSa::Q_ASSERT} .......................................................
#define Q_ASSERT(expr_) Q_ASSERT_ID(__LINE__, (expr_))

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-12-04
//! @version Last updated for: @ref qpcpp_7_3_1
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QF/C++ port to embOS RTOS kernel, generic C++11 compiler
@ -56,7 +56,7 @@
//============================================================================
namespace { // anonymous namespace with local definitions
Q_DEFINE_THIS_MODULE("qf_port")
Q_THIS_MODULE("qf_port");
//............................................................................
static void thread_function(void *pVoid); // prototype

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-12-04
//! @version Last updated for: @ref qpcpp_7_3_1
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QF/C++ port to FreeRTOS 10.x, generic C++11 compiler
@ -49,7 +49,7 @@
namespace { // unnamed local namespace
Q_DEFINE_THIS_MODULE("qf_port")
Q_THIS_MODULE("qf_port");
// Local objects -------------------------------------------------------------
static void task_function(void *pvParameters) { // FreeRTOS task signature

View File

@ -47,7 +47,8 @@
// AC++M16-3-2 function-like macro
-esym(9026,
Q_DEFINE_THIS_MODULE,
Q_THIS_MODULE,
Q_THIS_FILE,
Q_ASSERT_STATIC,
Q_ASSERT,
Q_ASSERT_ID,
@ -77,8 +78,7 @@
// MC++R10-0-6 unparenthesized macro parameter in definition of macro
-esym(9022,
Q_DEFINE_THIS_FILE,
Q_DEFINE_THIS_MODULE)
Q_THIS_MODULE)
// definition of macro ends in semi-colon
-esym(823,

View File

@ -27,11 +27,11 @@
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-09-07
//! @version Last updated for: @ref qpcpp_7_3_0
//! @date Last updated on: 2024-06-10
//! @version Last updated for: @ref qpc_7_4_0
//!
//! @file
//! @brief QF/C++ port for QUTEST Windows/Linux/macOS, GNU or Visual C++
//! @brief QP/C++ port for QUTEST Windows, generic C++11
#ifndef QP_PORT_HPP_
#define QP_PORT_HPP_
@ -49,8 +49,8 @@
#define QACTIVE_EQUEUE_TYPE QEQueue
// QF interrupt disable/enable
#define QF_INT_DISABLE() (++QP::QS::tstPriv_.intLock)
#define QF_INT_ENABLE() (--QP::QS::tstPriv_.intLock)
#define QF_INT_DISABLE() (QP::QS::onIntDisable())
#define QF_INT_ENABLE() (QP::QS::onIntEnable())
// QF critical section
#define QF_CRIT_STAT
@ -64,6 +64,12 @@
#include "qmpool.hpp" // QUTest port uses QMPool memory-pool
#include "qp.hpp" // QP platform-independent public interface
namespace QP {
namespace QS {
void onIntDisable();
void onIntEnable();
}
}
//============================================================================
// interface used only inside QF implementation, but not in applications

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2024-02-16
//! @version Last updated for: @ref qpcpp_7_3_3
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpc_7_4_0
//!
//! @file
//! @brief QS/C++ "port" to QUTest with POSIX
@ -63,7 +63,7 @@
namespace { // unnamed local namespace
//Q_DEFINE_THIS_MODULE("qutest_port")
Q_THIS_MODULE("qutest_port");
// local variables ...........................................................
static int l_sock = INVALID_SOCKET;
@ -118,6 +118,8 @@ bool QS::onStartup(void const *arg) {
if (*src == ':') {
serviceName = src + 1;
}
//printf("<TARGET> Connecting to QSPY on Host=%s:%s...\n",
// hostName, serviceName);
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET;
@ -208,8 +210,8 @@ void QS::onReset() {
//............................................................................
void QS::onFlush() {
// NOTE:
// No critical section in QS_onFlush() to avoid nesting of critical sections
// in case QS_onFlush() is called from Q_onError().
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
"invalid TCP socket");
@ -249,19 +251,20 @@ void QS::onFlush() {
nBytes = QS_TX_CHUNK;
}
}
//............................................................................
void QS::onTestLoop() {
fd_set readSet;
FD_ZERO(&readSet);
struct timeval timeout = {
(long)0, (long)(QS_TIMEOUT_MS * 1000)
};
rxPriv_.inTestLoop = true;
while (rxPriv_.inTestLoop) {
FD_SET(l_sock, &readSet);
struct timeval timeout = {
(long)0, (long)(QS_TIMEOUT_MS * 1000)
};
// selective, timed blocking on the TCP/IP socket...
timeout.tv_usec = (long)(QS_TIMEOUT_MS * 1000);
int status = select(l_sock + 1, &readSet,
@ -288,5 +291,20 @@ void QS::onTestLoop() {
rxPriv_.inTestLoop = true;
}
//............................................................................
void QS::onIntDisable(void) {
if (tstPriv_.intLock != 0U) {
Q_onError(&Q_this_module_[0], 998);
}
++tstPriv_.intLock;
}
//............................................................................
void QS::onIntEnable(void) {
--tstPriv_.intLock;
if (tstPriv_.intLock != 0U) {
Q_onError(&Q_this_module_[0], 999);
}
}
} // namespace QP

View File

@ -22,8 +22,8 @@
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2024-02-16
//! @version Last updated for: @ref qpcpp_7_3_3
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QF/C++ port to POSIX-QV (single-threaded)
@ -54,7 +54,7 @@
namespace { // unnamed local namespace
Q_DEFINE_THIS_MODULE("qf_port")
Q_THIS_MODULE("qf_port");
// Local objects =============================================================

View File

@ -22,8 +22,8 @@
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2024-02-16
//! @version Last updated for: @ref qpcpp_7_3_3
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QF/C++ port to POSIX (multithreaded with P-threads)
@ -54,7 +54,7 @@
namespace { // unnamed local namespace
Q_DEFINE_THIS_MODULE("qf_port")
Q_THIS_MODULE("qf_port");
// Local objects =============================================================
// initialize the startup mutex with default non-recursive initializer

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-12-04
//! @version Last updated for: @ref qpcpp_7_3_1
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QF/C++ port to ThreadX (a.k.a. Azure RTOS), generic C++11 compiler
@ -42,7 +42,7 @@
//============================================================================
namespace { // anonymous namespace with local definitions
Q_DEFINE_THIS_MODULE("qf_port")
Q_THIS_MODULE("qf_port");
static void thread_function(ULONG thread_input); // prototype
static void thread_function(ULONG thread_input) { // ThreadX signature

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-12-04
//! @version Last updated for: @ref qpcpp_7_3_1
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QF/C++ port to uC-OS2 RTOS, generic C++11 compiler
@ -42,7 +42,7 @@
//============================================================================
namespace { // anonymous namespace with local definitions
Q_DEFINE_THIS_MODULE("qf_port")
Q_THIS_MODULE("qf_port");
//............................................................................
static void task_function(void *pdata); // prototype

View File

@ -27,11 +27,11 @@
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-09-07
//! @version Last updated for: @ref qpcpp_7_3_0
//! @date Last updated on: 2024-06-10
//! @version Last updated for: @ref qpc_7_4_0
//!
//! @file
//! @brief QF/C++ port for QUTEST Windows, generic C++11
//! @brief QP/C++ port for QUTEST Windows, generic C++11
#ifndef QP_PORT_HPP_
#define QP_PORT_HPP_
@ -45,13 +45,12 @@
// no-return function specifier (C++11 Standard)
#define Q_NORETURN [[ noreturn ]] void
// QActive event queue type
#define QACTIVE_EQUEUE_TYPE QEQueue
// QF interrupt disable/enable
#define QF_INT_DISABLE() (++QP::QS::tstPriv_.intLock)
#define QF_INT_ENABLE() (--QP::QS::tstPriv_.intLock)
#define QF_INT_DISABLE() (QP::QS::onIntDisable())
#define QF_INT_ENABLE() (QP::QS::onIntEnable())
// QF critical section
#define QF_CRIT_STAT
@ -65,6 +64,12 @@
#include "qmpool.hpp" // QUTest port uses QMPool memory-pool
#include "qp.hpp" // QP platform-independent public interface
namespace QP {
namespace QS {
void onIntDisable();
void onIntEnable();
}
}
//============================================================================
// interface used only inside QF implementation, but not in applications

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-11-30
//! @version Last updated for: @ref qpcpp_7_3_3
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpc_7_4_0
//!
//! @file
//! @brief QUTEST port for Windows, GNU or Visual C++
@ -57,11 +57,11 @@
#define QS_TX_SIZE (8*1024)
#define QS_RX_SIZE (2*1024)
#define QS_TX_CHUNK QS_TX_SIZE
#define QS_TIMEOUT_MS 10
#define QS_TIMEOUT_MS 10U
namespace { // unnamed local namespace
//Q_DEFINE_THIS_MODULE("qutest_port")
Q_THIS_MODULE("qutest_port");
// local variables ...........................................................
static SOCKET l_sock = INVALID_SOCKET;
@ -171,7 +171,6 @@ bool QS::onStartup(void const *arg) {
sockopt_bool = TRUE;
setsockopt(l_sock, SOL_SOCKET, SO_DONTLINGER,
(const char *)&sockopt_bool, sizeof(sockopt_bool));
//PRINTF_S("<TARGET> Connected to QSPY at Host=%s:%d\n",
// hostName, port_remote);
onFlush();
@ -198,10 +197,10 @@ void QS::onReset() {
exit(0);
}
//............................................................................
// NOTE:
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
void QS::onFlush() {
// NOTE:
// No critical section in QS::onFlush() to avoid nesting of critical sections
// in case QS::onFlush() is called from Q_onError().
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
"invalid TCP socket");
@ -230,7 +229,6 @@ void QS::onFlush() {
}
else if (nSent < (int)nBytes) { // sent fewer than requested?
Sleep(QS_TIMEOUT_MS); // sleep for the timeout
// adjust the data and loop back to send() the rest
data += nSent;
nBytes -= (uint16_t)nSent;
@ -243,6 +241,7 @@ void QS::onFlush() {
nBytes = QS_TX_CHUNK;
}
}
//............................................................................
void QS::onTestLoop() {
fd_set readSet;
@ -281,5 +280,20 @@ void QS::onTestLoop() {
rxPriv_.inTestLoop = true;
}
//............................................................................
void QS::onIntDisable(void) {
if (tstPriv_.intLock != 0U) {
Q_onError(&Q_this_module_[0], 998);
}
++tstPriv_.intLock;
}
//............................................................................
void QS::onIntEnable(void) {
--tstPriv_.intLock;
if (tstPriv_.intLock != 0U) {
Q_onError(&Q_this_module_[0], 999);
}
}
} // namespace QP

View File

@ -22,8 +22,8 @@
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2024-02-16
//! @version Last updated for: @ref qpcpp_7_3_3
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QF/C++ port to Win32 (single-threaded, like the QV kernel)
@ -44,7 +44,7 @@
namespace { // unnamed local namespace
Q_DEFINE_THIS_MODULE("qf_port")
Q_THIS_MODULE("qf_port");
// Local objects =============================================================
static DWORD l_tickMsec = 10U; // clock tick in msec (argument for Sleep())

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-12-13
//! @version Last updated for: @ref qpcpp_7_3_2
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QS/C++ port to Win32 API
@ -63,7 +63,7 @@
namespace { // unnamed local namespace
//Q_DEFINE_THIS_MODULE("qs_port")
//Q_THIS_MODULE("qs_port");
// local variables ...........................................................
static SOCKET l_sock = INVALID_SOCKET;

View File

@ -22,8 +22,8 @@
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2024-02-16
//! @version Last updated for: @ref qpcpp_7_3_3
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QF/C++ port to Win32 (multithreaded)
@ -44,7 +44,7 @@
namespace { // unnamed local namespace
Q_DEFINE_THIS_MODULE("qf_port")
Q_THIS_MODULE("qf_port");
// Local objects =============================================================
static CRITICAL_SECTION l_startupCritSect;

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2023-12-13
//! @version Last updated for: @ref qpcpp_7_3_2
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpcpp_7_4_0
//!
//! @file
//! @brief QS/C++ port to Win32 API
@ -63,7 +63,7 @@
namespace { // unnamed local namespace
//Q_DEFINE_THIS_MODULE("qs_port")
//Q_THIS_MODULE("qs_port");
// local variables ...........................................................
static SOCKET l_sock = INVALID_SOCKET;

136
qpcpp.qm
View File

@ -567,9 +567,9 @@ QStateHandler t = s;
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_REQUIRE_INCRIT(300, QEvt::verify_(e));
Q_INVARIANT_INCRIT(302, (s != Q_STATE_CAST(0))
&amp;&amp; (m_state.uint == static_cast&lt;std::uintptr_t&gt;(~m_temp.uint)));
Q_INVARIANT_INCRIT(303, QEvt::verify_(e));
QS_MEM_SYS();
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
@ -823,6 +823,8 @@ do {
#ifndef Q_UNSAFE
m_temp.uint = ~m_state.uint;
#else
Q_UNUSED_PAR(isFound);
#endif
QF_CRIT_STAT
@ -1094,9 +1096,9 @@ QMState const *t = s;
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_INVARIANT_INCRIT(300, (s != nullptr)
Q_REQUIRE_INCRIT(300, QEvt::verify_(e));
Q_INVARIANT_INCRIT(302, (s != nullptr)
&amp;&amp; (m_state.uint == static_cast&lt;std::uintptr_t&gt;(~m_temp.uint)));
Q_INVARIANT_INCRIT(302, QEvt::verify_(e));
QS_MEM_SYS();
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
@ -2170,8 +2172,10 @@ QF_CRIT_ENTRY();
QF_MEM_SYS();
#ifndef Q_UNSAFE
Q_REQUIRE_INCRIT(100, QEvt::verify_(e));
std::uint8_t const pcopy = static_cast&lt;std::uint8_t&gt;(~m_prio_dis);
Q_INVARIANT_INCRIT(102, (QEvt::verify_(e)) &amp;&amp; (m_prio == pcopy));
Q_INVARIANT_INCRIT(102, m_prio == pcopy);
#endif
QEQueueCtr nFree = m_eQueue.m_nFree; // get volatile into temporary
@ -2227,7 +2231,13 @@ if (status) { // can post the event?
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QF_MEM_APP();
QF_CRIT_EXIT();
QS::onTestPost(sender, this, e, status);
QF_CRIT_ENTRY();
QF_MEM_SYS();
}
#endif
@ -2276,7 +2286,13 @@ else { // cannot post the event
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QF_MEM_APP();
QF_CRIT_EXIT();
QS::onTestPost(sender, this, e, status);
QF_CRIT_ENTRY();
QF_MEM_SYS();
}
#endif
@ -2309,8 +2325,10 @@ QF_CRIT_ENTRY();
QF_MEM_SYS();
#ifndef Q_UNSAFE
Q_REQUIRE_INCRIT(200, QEvt::verify_(e));
std::uint8_t const pcopy = static_cast&lt;std::uint8_t&gt;(~m_prio_dis);
Q_INVARIANT_INCRIT(202, (QEvt::verify_(e)) &amp;&amp; (m_prio == pcopy));
Q_INVARIANT_INCRIT(202, m_prio == pcopy);
#endif
#ifdef QXK_HPP_
@ -2351,7 +2369,13 @@ QS_END_PRE_()
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QF_MEM_APP();
QF_CRIT_EXIT();
QS::onTestPost(nullptr, this, e, true);
QF_CRIT_ENTRY();
QF_MEM_SYS();
}
#endif
@ -2384,6 +2408,8 @@ QACTIVE_EQUEUE_WAIT_(this); // wait for event to arrive directly
// always remove evt from the front
QEvt const * const e = m_eQueue.m_frontEvt;
Q_INVARIANT_INCRIT(312, QEvt::verify_(e));
QEQueueCtr const nFree = m_eQueue.m_nFree + 1U; // get volatile into tmp
m_eQueue.m_nFree = nFree; // update the # free
@ -3542,7 +3568,7 @@ QF_CRIT_STAT
QF_CRIT_ENTRY();
QF_MEM_SYS();
Q_REQUIRE_INCRIT(200, e != nullptr);
Q_REQUIRE_INCRIT(200, QEvt::verify_(e));
QEQueueCtr nFree = m_nFree; // get volatile into temporary
@ -3622,9 +3648,10 @@ QF_CRIT_STAT
QF_CRIT_ENTRY();
QF_MEM_SYS();
QEQueueCtr nFree = m_nFree; // get volatile into temporary
Q_REQUIRE_INCRIT(300, QEvt::verify_(e));
Q_REQUIRE_INCRIT(300, nFree != 0U);
QEQueueCtr nFree = m_nFree; // get volatile into temporary
Q_REQUIRE_INCRIT(301, nFree != 0U);
if (e-&gt;getPoolNum_() != 0U) { // is it a mutable event?
QEvt_refCtr_inc_(e); // increment the reference counter
@ -3675,6 +3702,9 @@ QF_MEM_SYS();
QEvt const * const e = m_frontEvt; // always remove evt from the front
if (e != nullptr) { // was the queue not empty?
Q_INVARIANT_INCRIT(412, QEvt::verify_(e));
// use a temporary variable to increment m_nFree
QEQueueCtr const nFree = m_nFree + 1U;
m_nFree = nFree; // update the # free
@ -3698,7 +3728,7 @@ if (e != nullptr) { // was the queue not empty?
m_frontEvt = nullptr; // queue becomes empty
// all entries in the queue must be free (+1 for fronEvt)
Q_ASSERT_INCRIT(410, nFree == (m_end + 1U));
Q_INVARIANT_INCRIT(420, nFree == (m_end + 1U));
QS_BEGIN_PRE_(QS_QF_EQUEUE_GET_LAST, qsId)
QS_TIME_PRE_(); // timestamp
@ -4256,7 +4286,7 @@ return e;</code>
<parameter name="e" type="QEvt const * const"/>
<code>QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_INVARIANT_INCRIT(402, QEvt::verify_(e));
Q_REQUIRE_INCRIT(400, QEvt::verify_(e));
std::uint_fast8_t const poolNum = e-&gt;getPoolNum_();
@ -4321,11 +4351,12 @@ Q_UNUSED_PAR(evtRef);
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_INVARIANT_INCRIT(502, QEvt::verify_(e));
Q_REQUIRE_INCRIT(500, QEvt::verify_(e));
std::uint_fast8_t const poolNum = e-&gt;getPoolNum_();
Q_UNUSED_PAR(poolNum); // might be unused
Q_REQUIRE_INCRIT(500, (poolNum != 0U)
Q_REQUIRE_INCRIT(501, (poolNum != 0U)
&amp;&amp; (evtRef == nullptr));
QEvt_refCtr_inc_(e); // increments the ref counter
@ -4348,11 +4379,11 @@ return e;</code>
<specifiers>noexcept</specifiers>
<!--${QF::QF-dyn::deleteRef_::evtRef}-->
<parameter name="evtRef" type="QEvt const * const"/>
<code>QEvt const * const e = evtRef;
QF_CRIT_STAT
<code>QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_INVARIANT_INCRIT(602, QEvt::verify_(e));
QEvt const * const e = evtRef;
Q_REQUIRE_INCRIT(600, QEvt::verify_(e));
#ifdef Q_SPY
std::uint_fast8_t const poolNum = e-&gt;getPoolNum_();
@ -4370,7 +4401,7 @@ QS_MEM_APP();
QF_CRIT_EXIT();
#if (QF_MAX_EPOOL &gt; 0U)
gc(evtRef); // recycle the referenced event
gc(e); // recycle the referenced event
#endif</code>
</operation>
<!--${QF::QF-dyn::q_new}-->
@ -7698,15 +7729,15 @@ QS::tstPriv_.readySet.update_(&amp;QS::tstPriv_.readySet_dis);
</operation>
<!--${QS::QUTest-stub::QF::run}-->
<operation name="run" type="int_t" visibility="0x00" properties="0x01">
<code>QS_CRIT_STAT
QS_CRIT_ENTRY();
QS_MEM_SYS();
// function dictionaries for the standard API
<code>// function dictionaries for the standard API
QS_FUN_DICTIONARY(&amp;QActive::post_);
QS_FUN_DICTIONARY(&amp;QActive::postLIFO);
QS_FUN_DICTIONARY(&amp;QS::processTestEvts_);
QS_CRIT_STAT
QS_CRIT_ENTRY();
QS_MEM_SYS();
// produce the QS_QF_RUN trace record
QS_BEGIN_PRE_(QS_QF_RUN, 0U)
QS_END_PRE_()
@ -8016,14 +8047,15 @@ QS_BEGIN_PRE_(rec, m_prio)
QS_EQC_PRE_(margin); // margin requested
QS_END_PRE_()
QF_MEM_APP();
QF_CRIT_EXIT();
// callback to examine the posted event under the same conditions
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QS::onTestPost(sender, this, e, status);
}
QF_MEM_APP();
QF_CRIT_EXIT();
// recycle the event immediately, because it was not really posted
#if (QF_MAX_EPOOL &gt; 0U)
@ -8063,15 +8095,15 @@ QS_BEGIN_PRE_(QS_QF_ACTIVE_POST_LIFO, m_prio)
QS_EQC_PRE_(0U); // min # free entries
QS_END_PRE_()
QF_MEM_APP();
QF_CRIT_EXIT();
// callback to examine the posted event under the same conditions
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QS::onTestPost(nullptr, this, e, true);
}
QF_MEM_APP();
QF_CRIT_EXIT();
// recycle the event immediately, because it was not really posted
#if (QF_MAX_EPOOL &gt; 0U)
QF::gc(e);
@ -9383,6 +9415,14 @@ extern char const BUILD_TIME[9];
//! @deprecated plain 'char' is no longer forbidden in MISRA/AUTOSAR-C++
using char_t = char;
//! @deprecated module name definition
//! Use Q_THIS_MODULE(name_) ended with a semicolon ';'
#define Q_DEFINE_THIS_MODULE(name_) Q_THIS_MODULE(name_);
//! @deprecated file name definition
//! Use Q_THIS_FILE() ended with a semicolon ';'
#define Q_DEFINE_THIS_FILE Q_THIS_FILE();
//! @deprecated assertion failure handler
//! Use Q_onError() instead.
#define Q_onAssert(module_, id_) Q_onError(module_, id_)
@ -9589,7 +9629,7 @@ using char_t = char;
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qep_hsm&quot;)
Q_THIS_MODULE(&quot;qep_hsm&quot;);
// immutable events corresponding to the reserved signals.
static QP::QEvt const l_reservedEvt_[4] {
@ -9653,7 +9693,7 @@ $define ${QEP::QHsm}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qep_msm&quot;)
Q_THIS_MODULE(&quot;qep_msm&quot;);
// maximum depth of state nesting in a QMsm (including the top level)
static constexpr std::int_fast8_t MAX_NEST_DEPTH_ {6};
@ -9695,7 +9735,7 @@ $define ${QEP::QMsm}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
//Q_DEFINE_THIS_MODULE(&quot;qf_act&quot;)
//Q_THIS_MODULE(&quot;qf_act&quot;);
} // unnamed namespace
$define ${QF::QActive::registry_[QF_MAX_ACTIVE + 1U]}
@ -9720,7 +9760,7 @@ $define ${QF::types::QF_LOG2}</text>
//============================================================================
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qf_actq&quot;)
Q_THIS_MODULE(&quot;qf_actq&quot;);
} // unnamed namespace
$define ${QF::QActive::post_}
@ -9746,7 +9786,7 @@ $define ${QF::QTicker}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qf_defer&quot;)
Q_THIS_MODULE(&quot;qf_defer&quot;);
} // unnamed namespace
$define ${QF::QActive::defer}
@ -9772,7 +9812,7 @@ $define ${QF::QActive::flushDeferred}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qf_dyn&quot;)
Q_THIS_MODULE(&quot;qf_dyn&quot;);
} // unnamed namespace
$define ${QF::QF-dyn}
@ -9794,7 +9834,7 @@ $define ${QF::QF-dyn}
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qf_mem&quot;)
Q_THIS_MODULE(&quot;qf_mem&quot;);
} // unnamed namespace
$define ${QF::QMPool}</text>
@ -9814,7 +9854,7 @@ $define ${QF::QMPool}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qf_qact&quot;)
Q_THIS_MODULE(&quot;qf_qact&quot;);
} // unnamed namespace
$define ${QF::QActive::QActive}
@ -9838,7 +9878,7 @@ $define ${QF::QActive::unregister_}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
//Q_DEFINE_THIS_MODULE(&quot;qf_qmact&quot;)
//Q_THIS_MODULE(&quot;qf_qmact&quot;);
} // unnamed namespace
$define ${QF::QMActive}</text>
@ -9858,7 +9898,7 @@ $define ${QF::QMActive}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qf_qeq&quot;)
Q_THIS_MODULE(&quot;qf_qeq&quot;);
} // unnamed namespace
$define ${QF::QEQueue}</text>
@ -9878,7 +9918,7 @@ $define ${QF::QEQueue}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qf_ps&quot;)
Q_THIS_MODULE(&quot;qf_ps&quot;);
} // unnamed namespace
$define ${QF::QActive::subscrList_}
@ -9910,7 +9950,7 @@ $define ${QF::QActive::unsubscribeAll}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qf_time&quot;)
Q_THIS_MODULE(&quot;qf_time&quot;);
} // unnamed namespace
$define ${QF::QTimeEvt}</text>
@ -9938,7 +9978,7 @@ $define ${QF::QTimeEvt}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qv&quot;)
Q_THIS_MODULE(&quot;qv&quot;);
} // unnamed namespace
$define ${QV::QV-base}
@ -9970,7 +10010,7 @@ $define ${QV::QActive}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qk&quot;)
Q_THIS_MODULE(&quot;qk&quot;);
} // unnamed namespace
$define ${QK::QK-base}
@ -10006,7 +10046,7 @@ $define ${QK::QActive}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qxk&quot;)
Q_THIS_MODULE(&quot;qxk&quot;);
} // unnamed namespace
$define ${QXK::QXK-base}
@ -10039,7 +10079,7 @@ $define ${QXK::QActive}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qxk_mutex&quot;)
Q_THIS_MODULE(&quot;qxk_mutex&quot;);
} // unnamed namespace
$define ${QXK::QXMutex}</text>
@ -10064,7 +10104,7 @@ $define ${QXK::QXMutex}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qxk_sema&quot;)
Q_THIS_MODULE(&quot;qxk_sema&quot;);
} // unnamed namespace
$define ${QXK::QXSemaphore}</text>
@ -10089,7 +10129,7 @@ $define ${QXK::QXSemaphore}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qxk_xthr&quot;)
Q_THIS_MODULE(&quot;qxk_xthr&quot;);
} // unnamed namespace
$define ${QXK::QXThread}</text>
@ -10107,7 +10147,7 @@ $define ${QXK::QXThread}</text>
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qs&quot;)
Q_THIS_MODULE(&quot;qs&quot;);
} // unnamed namespace
$define ${QS::QS-TX}
@ -11187,7 +11227,7 @@ void f64_fmt_(
namespace { // unnamed local namespace
Q_DEFINE_THIS_MODULE(&quot;qs_rx&quot;)
Q_THIS_MODULE(&quot;qs_rx&quot;);
enum RxStateEnum : std::uint8_t {
ERROR_STATE,
@ -12355,7 +12395,7 @@ Q_NORETURN Q_onError(
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE(&quot;qutest&quot;)
Q_THIS_MODULE(&quot;qutest&quot;);
} // unnamed namespace
namespace QP {

View File

@ -56,7 +56,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qep_hsm")
Q_THIS_MODULE("qep_hsm");
// immutable events corresponding to the reserved signals.
static QP::QEvt const l_reservedEvt_[4] {
@ -254,9 +254,9 @@ void QHsm::dispatch(
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_REQUIRE_INCRIT(300, QEvt::verify_(e));
Q_INVARIANT_INCRIT(302, (s != Q_STATE_CAST(0))
&& (m_state.uint == static_cast<std::uintptr_t>(~m_temp.uint)));
Q_INVARIANT_INCRIT(303, QEvt::verify_(e));
QS_MEM_SYS();
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
@ -506,6 +506,8 @@ QStateHandler QHsm::childState(QStateHandler const parent) noexcept {
#ifndef Q_UNSAFE
m_temp.uint = ~m_state.uint;
#else
Q_UNUSED_PAR(isFound);
#endif
QF_CRIT_STAT

View File

@ -57,7 +57,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qep_msm")
Q_THIS_MODULE("qep_msm");
// maximum depth of state nesting in a QMsm (including the top level)
static constexpr std::int_fast8_t MAX_NEST_DEPTH_ {6};
@ -177,9 +177,9 @@ void QMsm::dispatch(
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_INVARIANT_INCRIT(300, (s != nullptr)
Q_REQUIRE_INCRIT(300, QEvt::verify_(e));
Q_INVARIANT_INCRIT(302, (s != nullptr)
&& (m_state.uint == static_cast<std::uintptr_t>(~m_temp.uint)));
Q_INVARIANT_INCRIT(302, QEvt::verify_(e));
QS_MEM_SYS();
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)

View File

@ -53,7 +53,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
//Q_DEFINE_THIS_MODULE("qf_act")
//Q_THIS_MODULE("qf_act");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -54,7 +54,7 @@
//============================================================================
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qf_actq")
Q_THIS_MODULE("qf_actq");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
@ -90,8 +90,10 @@ bool QActive::post_(
QF_MEM_SYS();
#ifndef Q_UNSAFE
Q_REQUIRE_INCRIT(100, QEvt::verify_(e));
std::uint8_t const pcopy = static_cast<std::uint8_t>(~m_prio_dis);
Q_INVARIANT_INCRIT(102, (QEvt::verify_(e)) && (m_prio == pcopy));
Q_INVARIANT_INCRIT(102, m_prio == pcopy);
#endif
QEQueueCtr nFree = m_eQueue.m_nFree; // get volatile into temporary
@ -147,7 +149,13 @@ bool QActive::post_(
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QF_MEM_APP();
QF_CRIT_EXIT();
QS::onTestPost(sender, this, e, status);
QF_CRIT_ENTRY();
QF_MEM_SYS();
}
#endif
@ -196,7 +204,13 @@ bool QActive::post_(
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QF_MEM_APP();
QF_CRIT_EXIT();
QS::onTestPost(sender, this, e, status);
QF_CRIT_ENTRY();
QF_MEM_SYS();
}
#endif
@ -233,8 +247,10 @@ void QActive::postLIFO(QEvt const * const e) noexcept {
QF_MEM_SYS();
#ifndef Q_UNSAFE
Q_REQUIRE_INCRIT(200, QEvt::verify_(e));
std::uint8_t const pcopy = static_cast<std::uint8_t>(~m_prio_dis);
Q_INVARIANT_INCRIT(202, (QEvt::verify_(e)) && (m_prio == pcopy));
Q_INVARIANT_INCRIT(202, m_prio == pcopy);
#endif
#ifdef QXK_HPP_
@ -275,7 +291,13 @@ void QActive::postLIFO(QEvt const * const e) noexcept {
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QF_MEM_APP();
QF_CRIT_EXIT();
QS::onTestPost(nullptr, this, e, true);
QF_CRIT_ENTRY();
QF_MEM_SYS();
}
#endif
@ -314,6 +336,8 @@ QEvt const * QActive::get_() noexcept {
// always remove evt from the front
QEvt const * const e = m_eQueue.m_frontEvt;
Q_INVARIANT_INCRIT(312, QEvt::verify_(e));
QEQueueCtr const nFree = m_eQueue.m_nFree + 1U; // get volatile into tmp
m_eQueue.m_nFree = nFree; // update the # free

View File

@ -53,7 +53,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qf_defer")
Q_THIS_MODULE("qf_defer");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -55,7 +55,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qf_dyn")
Q_THIS_MODULE("qf_dyn");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
@ -222,7 +222,7 @@ QEvt * newX_(
void gc(QEvt const * const e) noexcept {
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_INVARIANT_INCRIT(402, QEvt::verify_(e));
Q_REQUIRE_INCRIT(400, QEvt::verify_(e));
std::uint_fast8_t const poolNum = e->getPoolNum_();
@ -286,11 +286,12 @@ QEvt const * newRef_(
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_INVARIANT_INCRIT(502, QEvt::verify_(e));
Q_REQUIRE_INCRIT(500, QEvt::verify_(e));
std::uint_fast8_t const poolNum = e->getPoolNum_();
Q_UNUSED_PAR(poolNum); // might be unused
Q_REQUIRE_INCRIT(500, (poolNum != 0U)
Q_REQUIRE_INCRIT(501, (poolNum != 0U)
&& (evtRef == nullptr));
QEvt_refCtr_inc_(e); // increments the ref counter
@ -311,11 +312,11 @@ QEvt const * newRef_(
//${QF::QF-dyn::deleteRef_} ..................................................
void deleteRef_(QEvt const * const evtRef) noexcept {
QEvt const * const e = evtRef;
QF_CRIT_STAT
QF_CRIT_ENTRY();
Q_INVARIANT_INCRIT(602, QEvt::verify_(e));
QEvt const * const e = evtRef;
Q_REQUIRE_INCRIT(600, QEvt::verify_(e));
#ifdef Q_SPY
std::uint_fast8_t const poolNum = e->getPoolNum_();
@ -333,7 +334,7 @@ void deleteRef_(QEvt const * const evtRef) noexcept {
QF_CRIT_EXIT();
#if (QF_MAX_EPOOL > 0U)
gc(evtRef); // recycle the referenced event
gc(e); // recycle the referenced event
#endif
}

View File

@ -53,7 +53,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qf_mem")
Q_THIS_MODULE("qf_mem");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -53,7 +53,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qf_ps")
Q_THIS_MODULE("qf_ps");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -53,7 +53,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qf_qact")
Q_THIS_MODULE("qf_qact");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -53,7 +53,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qf_qeq")
Q_THIS_MODULE("qf_qeq");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
@ -109,7 +109,7 @@ bool QEQueue::post(
QF_CRIT_ENTRY();
QF_MEM_SYS();
Q_REQUIRE_INCRIT(200, e != nullptr);
Q_REQUIRE_INCRIT(200, QEvt::verify_(e));
QEQueueCtr nFree = m_nFree; // get volatile into temporary
@ -188,9 +188,10 @@ void QEQueue::postLIFO(
QF_CRIT_ENTRY();
QF_MEM_SYS();
QEQueueCtr nFree = m_nFree; // get volatile into temporary
Q_REQUIRE_INCRIT(300, QEvt::verify_(e));
Q_REQUIRE_INCRIT(300, nFree != 0U);
QEQueueCtr nFree = m_nFree; // get volatile into temporary
Q_REQUIRE_INCRIT(301, nFree != 0U);
if (e->getPoolNum_() != 0U) { // is it a mutable event?
QEvt_refCtr_inc_(e); // increment the reference counter
@ -239,6 +240,9 @@ QEvt const * QEQueue::get(std::uint_fast8_t const qsId) noexcept {
QEvt const * const e = m_frontEvt; // always remove evt from the front
if (e != nullptr) { // was the queue not empty?
Q_INVARIANT_INCRIT(412, QEvt::verify_(e));
// use a temporary variable to increment m_nFree
QEQueueCtr const nFree = m_nFree + 1U;
m_nFree = nFree; // update the # free
@ -262,7 +266,7 @@ QEvt const * QEQueue::get(std::uint_fast8_t const qsId) noexcept {
m_frontEvt = nullptr; // queue becomes empty
// all entries in the queue must be free (+1 for fronEvt)
Q_ASSERT_INCRIT(410, nFree == (m_end + 1U));
Q_INVARIANT_INCRIT(420, nFree == (m_end + 1U));
QS_BEGIN_PRE_(QS_QF_EQUEUE_GET_LAST, qsId)
QS_TIME_PRE_(); // timestamp

View File

@ -53,7 +53,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
//Q_DEFINE_THIS_MODULE("qf_qmact")
//Q_THIS_MODULE("qf_qmact");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -53,7 +53,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qf_time")
Q_THIS_MODULE("qf_time");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -58,7 +58,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qk")
Q_THIS_MODULE("qk");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -48,7 +48,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qs")
Q_THIS_MODULE("qs");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -51,7 +51,7 @@
namespace { // unnamed local namespace
Q_DEFINE_THIS_MODULE("qs_rx")
Q_THIS_MODULE("qs_rx");
enum RxStateEnum : std::uint8_t {
ERROR_STATE,

View File

@ -154,7 +154,7 @@ Q_NORETURN Q_onError(
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qutest")
Q_THIS_MODULE("qutest");
} // unnamed namespace
namespace QP {
@ -212,15 +212,15 @@ void stop() {
//${QS::QUTest-stub::QF::run} ................................................
int_t run() {
QS_CRIT_STAT
QS_CRIT_ENTRY();
QS_MEM_SYS();
// function dictionaries for the standard API
QS_FUN_DICTIONARY(&QActive::post_);
QS_FUN_DICTIONARY(&QActive::postLIFO);
QS_FUN_DICTIONARY(&QS::processTestEvts_);
QS_CRIT_STAT
QS_CRIT_ENTRY();
QS_MEM_SYS();
// produce the QS_QF_RUN trace record
QS_BEGIN_PRE_(QS_QF_RUN, 0U)
QS_END_PRE_()
@ -522,14 +522,15 @@ bool QActiveDummy::fakePost(
QS_EQC_PRE_(margin); // margin requested
QS_END_PRE_()
QF_MEM_APP();
QF_CRIT_EXIT();
// callback to examine the posted event under the same conditions
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QS::onTestPost(sender, this, e, status);
}
QF_MEM_APP();
QF_CRIT_EXIT();
// recycle the event immediately, because it was not really posted
#if (QF_MAX_EPOOL > 0U)
@ -567,15 +568,15 @@ void QActiveDummy::fakePostLIFO(QEvt const * const e) noexcept {
QS_EQC_PRE_(0U); // min # free entries
QS_END_PRE_()
QF_MEM_APP();
QF_CRIT_EXIT();
// callback to examine the posted event under the same conditions
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
// the local filter for this AO ('m_prio') is set
if (QS_LOC_CHECK_(m_prio)) {
QS::onTestPost(nullptr, this, e, true);
}
QF_MEM_APP();
QF_CRIT_EXIT();
// recycle the event immediately, because it was not really posted
#if (QF_MAX_EPOOL > 0U)
QF::gc(e);

View File

@ -58,7 +58,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qv")
Q_THIS_MODULE("qv");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -58,7 +58,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qxk")
Q_THIS_MODULE("qxk");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -58,7 +58,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qxk_mutex")
Q_THIS_MODULE("qxk_mutex");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -58,7 +58,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qxk_sema")
Q_THIS_MODULE("qxk_sema");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -58,7 +58,7 @@
// unnamed namespace for local definitions with internal linkage
namespace {
Q_DEFINE_THIS_MODULE("qxk_xthr")
Q_THIS_MODULE("qxk_xthr");
} // unnamed namespace
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

View File

@ -42,7 +42,7 @@
namespace {
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
// Local-scope objects -------------------------------------------------------
#define LED_PORT gpioPortF

View File

@ -39,7 +39,7 @@
namespace {
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
// Local-scope objects -----------------------------------------------------
// LED pins available on the board (just one user LED LD4--Green on PA.5)

View File

@ -41,7 +41,7 @@
namespace {
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
#ifdef Q_SPY

View File

@ -39,7 +39,7 @@
namespace {
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
// Local-scope objects -------------------------------------------------------
// LED pins available on the board (just one user LED LD2--Green on PA.5)

View File

@ -34,7 +34,7 @@
#include "qpcpp.hpp"
#include "bsp.hpp"
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
namespace {
//============================================================================

View File

@ -42,7 +42,7 @@
namespace {
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
// Local-scope objects -------------------------------------------------------
#define LED_PORT gpioPortF

View File

@ -39,7 +39,7 @@
namespace {
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
// Local-scope objects -----------------------------------------------------
// LED pins available on the board (just one user LED LD4--Green on PA.5)

View File

@ -41,7 +41,7 @@
namespace {
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
#ifdef Q_SPY

View File

@ -39,7 +39,7 @@
namespace {
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
// Local-scope objects -------------------------------------------------------
// LED pins available on the board (just one user LED LD2--Green on PA.5)

View File

@ -34,7 +34,7 @@
#include "qpcpp.hpp"
#include "bsp.hpp"
Q_DEFINE_THIS_FILE
Q_THIS_FILE();
namespace {
//============================================================================

View File

@ -22,8 +22,8 @@
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2024-01-03
//! @version Last updated for: @ref qpc_7_3_2
//! @date Last updated on: 2024-06-11
//! @version Last updated for: @ref qpc_7_4_0
//!
//! @file
//! @brief QF/C++ port to Zephyr RTOS kernel, all supported compilers
@ -41,7 +41,7 @@
namespace { // unnamed namespace
Q_DEFINE_THIS_MODULE("qf_port")
Q_THIS_MODULE("qf_port");
//............................................................................
static void thread_entry(void *p1, void *p2, void *p3) { // Zephyr signature

View File

@ -1,7 +1,7 @@
//============================================================================
// Product: QUTEST port for Zephyr RTOS
// Last updated for version 7.3.2
// Last updated on 2023-12-13
// Last updated for version 7.4.0
// Last updated on 2024-06-11
//
// Q u a n t u m L e a P s
// ------------------------
@ -46,7 +46,7 @@
namespace {
//Q_DEFINE_THIS_MODULE("qutest_port")
//Q_THIS_MODULE("qutest_port");
// select the Zephyr shell UART
// NOTE: you can change this to other UART peripheral if desired