mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-02-04 06:13:00 +08:00
7.4.0-rc.2
This commit is contained in:
parent
daa8c78da4
commit
9f079e60e7
@ -1 +1 @@
|
|||||||
Subproject commit 054cd1abe4b4abef5e45f36b1ce8f2aff4575494
|
Subproject commit a0b274a334955b78bd837c8c47ee6ccb314b2c35
|
2
examples
2
examples
@ -1 +1 @@
|
|||||||
Subproject commit 0537a180ce504ab971b26491c9bf945e4b711b4a
|
Subproject commit aeb634ba4e430d2e69814d80cea0d7cddc568957
|
@ -72,6 +72,14 @@
|
|||||||
//! @deprecated plain 'char' is no longer forbidden in MISRA/AUTOSAR-C++
|
//! @deprecated plain 'char' is no longer forbidden in MISRA/AUTOSAR-C++
|
||||||
using char_t = char;
|
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
|
//! @deprecated assertion failure handler
|
||||||
//! Use Q_onError() instead.
|
//! Use Q_onError() instead.
|
||||||
#define Q_onAssert(module_, id_) Q_onError(module_, id_)
|
#define Q_onAssert(module_, id_) Q_onError(module_, id_)
|
||||||
|
@ -64,9 +64,9 @@ extern "C" {
|
|||||||
|
|
||||||
//$declare${QP-FuSa::enabled} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$declare${QP-FuSa::enabled} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
|
||||||
//${QP-FuSa::enabled::Q_DEFINE_THIS_MODULE} ..................................
|
//${QP-FuSa::enabled::Q_THIS_MODULE} .........................................
|
||||||
#define Q_DEFINE_THIS_MODULE(name_) \
|
#define Q_THIS_MODULE(name_) \
|
||||||
static char const Q_this_module_[] = name_;
|
static char const Q_this_module_[] = name_
|
||||||
|
|
||||||
//${QP-FuSa::enabled::Q_ASSERT_INCRIT} .......................................
|
//${QP-FuSa::enabled::Q_ASSERT_INCRIT} .......................................
|
||||||
#define Q_ASSERT_INCRIT(id_, expr_) \
|
#define Q_ASSERT_INCRIT(id_, expr_) \
|
||||||
@ -97,8 +97,8 @@ extern "C" {
|
|||||||
#else
|
#else
|
||||||
//$declare${QP-FuSa::disabled} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$declare${QP-FuSa::disabled} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
|
||||||
//${QP-FuSa::disabled::Q_DEFINE_THIS_MODULE} .................................
|
//${QP-FuSa::disabled::Q_THIS_MODULE} ........................................
|
||||||
#define Q_DEFINE_THIS_MODULE(name_)
|
#define Q_THIS_MODULE(name_) extern char Q_this_module_
|
||||||
|
|
||||||
//${QP-FuSa::disabled::Q_ASSERT_INCRIT} ......................................
|
//${QP-FuSa::disabled::Q_ASSERT_INCRIT} ......................................
|
||||||
#define Q_ASSERT_INCRIT(id_, expr_) ((void)0)
|
#define Q_ASSERT_INCRIT(id_, expr_) ((void)0)
|
||||||
@ -117,8 +117,8 @@ extern "C" {
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
//$declare1${QP-FuSa} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$declare1${QP-FuSa} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
|
||||||
//${QP-FuSa::Q_DEFINE_THIS_FILE} .............................................
|
//${QP-FuSa::Q_THIS_FILE} ....................................................
|
||||||
#define Q_DEFINE_THIS_FILE Q_DEFINE_THIS_MODULE(__FILE__)
|
#define Q_THIS_FILE() Q_THIS_MODULE(__FILE__)
|
||||||
|
|
||||||
//${QP-FuSa::Q_ASSERT} .......................................................
|
//${QP-FuSa::Q_ASSERT} .......................................................
|
||||||
#define Q_ASSERT(expr_) Q_ASSERT_ID(__LINE__, (expr_))
|
#define Q_ASSERT(expr_) Q_ASSERT_ID(__LINE__, (expr_))
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com>
|
// <www.state-machine.com>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2023-12-04
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_1
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QF/C++ port to embOS RTOS kernel, generic C++11 compiler
|
//! @brief QF/C++ port to embOS RTOS kernel, generic C++11 compiler
|
||||||
@ -56,7 +56,7 @@
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
namespace { // anonymous namespace with local definitions
|
namespace { // anonymous namespace with local definitions
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qf_port")
|
Q_THIS_MODULE("qf_port");
|
||||||
|
|
||||||
//............................................................................
|
//............................................................................
|
||||||
static void thread_function(void *pVoid); // prototype
|
static void thread_function(void *pVoid); // prototype
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com>
|
// <www.state-machine.com>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2023-12-04
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_1
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QF/C++ port to FreeRTOS 10.x, generic C++11 compiler
|
//! @brief QF/C++ port to FreeRTOS 10.x, generic C++11 compiler
|
||||||
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qf_port")
|
Q_THIS_MODULE("qf_port");
|
||||||
|
|
||||||
// Local objects -------------------------------------------------------------
|
// Local objects -------------------------------------------------------------
|
||||||
static void task_function(void *pvParameters) { // FreeRTOS task signature
|
static void task_function(void *pvParameters) { // FreeRTOS task signature
|
||||||
|
@ -47,7 +47,8 @@
|
|||||||
|
|
||||||
// AC++M16-3-2 function-like macro
|
// AC++M16-3-2 function-like macro
|
||||||
-esym(9026,
|
-esym(9026,
|
||||||
Q_DEFINE_THIS_MODULE,
|
Q_THIS_MODULE,
|
||||||
|
Q_THIS_FILE,
|
||||||
Q_ASSERT_STATIC,
|
Q_ASSERT_STATIC,
|
||||||
Q_ASSERT,
|
Q_ASSERT,
|
||||||
Q_ASSERT_ID,
|
Q_ASSERT_ID,
|
||||||
@ -77,8 +78,7 @@
|
|||||||
|
|
||||||
// MC++R10-0-6 unparenthesized macro parameter in definition of macro
|
// MC++R10-0-6 unparenthesized macro parameter in definition of macro
|
||||||
-esym(9022,
|
-esym(9022,
|
||||||
Q_DEFINE_THIS_FILE,
|
Q_THIS_MODULE)
|
||||||
Q_DEFINE_THIS_MODULE)
|
|
||||||
|
|
||||||
// definition of macro ends in semi-colon
|
// definition of macro ends in semi-colon
|
||||||
-esym(823,
|
-esym(823,
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
// <www.state-machine.com/licensing>
|
// <www.state-machine.com/licensing>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2023-09-07
|
//! @date Last updated on: 2024-06-10
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_0
|
//! @version Last updated for: @ref qpc_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @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_
|
#ifndef QP_PORT_HPP_
|
||||||
#define QP_PORT_HPP_
|
#define QP_PORT_HPP_
|
||||||
@ -49,8 +49,8 @@
|
|||||||
#define QACTIVE_EQUEUE_TYPE QEQueue
|
#define QACTIVE_EQUEUE_TYPE QEQueue
|
||||||
|
|
||||||
// QF interrupt disable/enable
|
// QF interrupt disable/enable
|
||||||
#define QF_INT_DISABLE() (++QP::QS::tstPriv_.intLock)
|
#define QF_INT_DISABLE() (QP::QS::onIntDisable())
|
||||||
#define QF_INT_ENABLE() (--QP::QS::tstPriv_.intLock)
|
#define QF_INT_ENABLE() (QP::QS::onIntEnable())
|
||||||
|
|
||||||
// QF critical section
|
// QF critical section
|
||||||
#define QF_CRIT_STAT
|
#define QF_CRIT_STAT
|
||||||
@ -64,6 +64,12 @@
|
|||||||
#include "qmpool.hpp" // QUTest port uses QMPool memory-pool
|
#include "qmpool.hpp" // QUTest port uses QMPool memory-pool
|
||||||
#include "qp.hpp" // QP platform-independent public interface
|
#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
|
// interface used only inside QF implementation, but not in applications
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com>
|
// <www.state-machine.com>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2024-02-16
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_3
|
//! @version Last updated for: @ref qpc_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QS/C++ "port" to QUTest with POSIX
|
//! @brief QS/C++ "port" to QUTest with POSIX
|
||||||
@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
//Q_DEFINE_THIS_MODULE("qutest_port")
|
Q_THIS_MODULE("qutest_port");
|
||||||
|
|
||||||
// local variables ...........................................................
|
// local variables ...........................................................
|
||||||
static int l_sock = INVALID_SOCKET;
|
static int l_sock = INVALID_SOCKET;
|
||||||
@ -118,6 +118,8 @@ bool QS::onStartup(void const *arg) {
|
|||||||
if (*src == ':') {
|
if (*src == ':') {
|
||||||
serviceName = src + 1;
|
serviceName = src + 1;
|
||||||
}
|
}
|
||||||
|
//printf("<TARGET> Connecting to QSPY on Host=%s:%s...\n",
|
||||||
|
// hostName, serviceName);
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
hints.ai_family = AF_INET;
|
hints.ai_family = AF_INET;
|
||||||
@ -208,8 +210,8 @@ void QS::onReset() {
|
|||||||
//............................................................................
|
//............................................................................
|
||||||
void QS::onFlush() {
|
void QS::onFlush() {
|
||||||
// NOTE:
|
// NOTE:
|
||||||
// No critical section in QS_onFlush() to avoid nesting of critical sections
|
// No critical section in QS::onFlush() to avoid nesting of critical sections
|
||||||
// in case QS_onFlush() is called from Q_onError().
|
// in case QS::onFlush() is called from Q_onError().
|
||||||
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
|
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
|
||||||
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
|
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
|
||||||
"invalid TCP socket");
|
"invalid TCP socket");
|
||||||
@ -249,19 +251,20 @@ void QS::onFlush() {
|
|||||||
nBytes = QS_TX_CHUNK;
|
nBytes = QS_TX_CHUNK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//............................................................................
|
//............................................................................
|
||||||
void QS::onTestLoop() {
|
void QS::onTestLoop() {
|
||||||
fd_set readSet;
|
fd_set readSet;
|
||||||
FD_ZERO(&readSet);
|
FD_ZERO(&readSet);
|
||||||
|
|
||||||
struct timeval timeout = {
|
|
||||||
(long)0, (long)(QS_TIMEOUT_MS * 1000)
|
|
||||||
};
|
|
||||||
|
|
||||||
rxPriv_.inTestLoop = true;
|
rxPriv_.inTestLoop = true;
|
||||||
while (rxPriv_.inTestLoop) {
|
while (rxPriv_.inTestLoop) {
|
||||||
FD_SET(l_sock, &readSet);
|
FD_SET(l_sock, &readSet);
|
||||||
|
|
||||||
|
struct timeval timeout = {
|
||||||
|
(long)0, (long)(QS_TIMEOUT_MS * 1000)
|
||||||
|
};
|
||||||
|
|
||||||
// selective, timed blocking on the TCP/IP socket...
|
// selective, timed blocking on the TCP/IP socket...
|
||||||
timeout.tv_usec = (long)(QS_TIMEOUT_MS * 1000);
|
timeout.tv_usec = (long)(QS_TIMEOUT_MS * 1000);
|
||||||
int status = select(l_sock + 1, &readSet,
|
int status = select(l_sock + 1, &readSet,
|
||||||
@ -288,5 +291,20 @@ void QS::onTestLoop() {
|
|||||||
rxPriv_.inTestLoop = true;
|
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
|
} // namespace QP
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com/licensing>
|
// <www.state-machine.com/licensing>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2024-02-16
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_3
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QF/C++ port to POSIX-QV (single-threaded)
|
//! @brief QF/C++ port to POSIX-QV (single-threaded)
|
||||||
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qf_port")
|
Q_THIS_MODULE("qf_port");
|
||||||
|
|
||||||
// Local objects =============================================================
|
// Local objects =============================================================
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com/licensing>
|
// <www.state-machine.com/licensing>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2024-02-16
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_3
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QF/C++ port to POSIX (multithreaded with P-threads)
|
//! @brief QF/C++ port to POSIX (multithreaded with P-threads)
|
||||||
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qf_port")
|
Q_THIS_MODULE("qf_port");
|
||||||
|
|
||||||
// Local objects =============================================================
|
// Local objects =============================================================
|
||||||
// initialize the startup mutex with default non-recursive initializer
|
// initialize the startup mutex with default non-recursive initializer
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com>
|
// <www.state-machine.com>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2023-12-04
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_1
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QF/C++ port to ThreadX (a.k.a. Azure RTOS), generic C++11 compiler
|
//! @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
|
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); // prototype
|
||||||
static void thread_function(ULONG thread_input) { // ThreadX signature
|
static void thread_function(ULONG thread_input) { // ThreadX signature
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com>
|
// <www.state-machine.com>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2023-12-04
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_1
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QF/C++ port to uC-OS2 RTOS, generic C++11 compiler
|
//! @brief QF/C++ port to uC-OS2 RTOS, generic C++11 compiler
|
||||||
@ -42,7 +42,7 @@
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
namespace { // anonymous namespace with local definitions
|
namespace { // anonymous namespace with local definitions
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qf_port")
|
Q_THIS_MODULE("qf_port");
|
||||||
|
|
||||||
//............................................................................
|
//............................................................................
|
||||||
static void task_function(void *pdata); // prototype
|
static void task_function(void *pdata); // prototype
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
// <www.state-machine.com/licensing>
|
// <www.state-machine.com/licensing>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2023-09-07
|
//! @date Last updated on: 2024-06-10
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_0
|
//! @version Last updated for: @ref qpc_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @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_
|
#ifndef QP_PORT_HPP_
|
||||||
#define QP_PORT_HPP_
|
#define QP_PORT_HPP_
|
||||||
@ -45,13 +45,12 @@
|
|||||||
// no-return function specifier (C++11 Standard)
|
// no-return function specifier (C++11 Standard)
|
||||||
#define Q_NORETURN [[ noreturn ]] void
|
#define Q_NORETURN [[ noreturn ]] void
|
||||||
|
|
||||||
|
|
||||||
// QActive event queue type
|
// QActive event queue type
|
||||||
#define QACTIVE_EQUEUE_TYPE QEQueue
|
#define QACTIVE_EQUEUE_TYPE QEQueue
|
||||||
|
|
||||||
// QF interrupt disable/enable
|
// QF interrupt disable/enable
|
||||||
#define QF_INT_DISABLE() (++QP::QS::tstPriv_.intLock)
|
#define QF_INT_DISABLE() (QP::QS::onIntDisable())
|
||||||
#define QF_INT_ENABLE() (--QP::QS::tstPriv_.intLock)
|
#define QF_INT_ENABLE() (QP::QS::onIntEnable())
|
||||||
|
|
||||||
// QF critical section
|
// QF critical section
|
||||||
#define QF_CRIT_STAT
|
#define QF_CRIT_STAT
|
||||||
@ -65,6 +64,12 @@
|
|||||||
#include "qmpool.hpp" // QUTest port uses QMPool memory-pool
|
#include "qmpool.hpp" // QUTest port uses QMPool memory-pool
|
||||||
#include "qp.hpp" // QP platform-independent public interface
|
#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
|
// interface used only inside QF implementation, but not in applications
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com>
|
// <www.state-machine.com>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2023-11-30
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_3
|
//! @version Last updated for: @ref qpc_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QUTEST port for Windows, GNU or Visual C++
|
//! @brief QUTEST port for Windows, GNU or Visual C++
|
||||||
@ -57,11 +57,11 @@
|
|||||||
#define QS_TX_SIZE (8*1024)
|
#define QS_TX_SIZE (8*1024)
|
||||||
#define QS_RX_SIZE (2*1024)
|
#define QS_RX_SIZE (2*1024)
|
||||||
#define QS_TX_CHUNK QS_TX_SIZE
|
#define QS_TX_CHUNK QS_TX_SIZE
|
||||||
#define QS_TIMEOUT_MS 10
|
#define QS_TIMEOUT_MS 10U
|
||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
//Q_DEFINE_THIS_MODULE("qutest_port")
|
Q_THIS_MODULE("qutest_port");
|
||||||
|
|
||||||
// local variables ...........................................................
|
// local variables ...........................................................
|
||||||
static SOCKET l_sock = INVALID_SOCKET;
|
static SOCKET l_sock = INVALID_SOCKET;
|
||||||
@ -171,7 +171,6 @@ bool QS::onStartup(void const *arg) {
|
|||||||
sockopt_bool = TRUE;
|
sockopt_bool = TRUE;
|
||||||
setsockopt(l_sock, SOL_SOCKET, SO_DONTLINGER,
|
setsockopt(l_sock, SOL_SOCKET, SO_DONTLINGER,
|
||||||
(const char *)&sockopt_bool, sizeof(sockopt_bool));
|
(const char *)&sockopt_bool, sizeof(sockopt_bool));
|
||||||
|
|
||||||
//PRINTF_S("<TARGET> Connected to QSPY at Host=%s:%d\n",
|
//PRINTF_S("<TARGET> Connected to QSPY at Host=%s:%d\n",
|
||||||
// hostName, port_remote);
|
// hostName, port_remote);
|
||||||
onFlush();
|
onFlush();
|
||||||
@ -198,10 +197,10 @@ void QS::onReset() {
|
|||||||
exit(0);
|
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() {
|
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?
|
if (l_sock == INVALID_SOCKET) { // socket NOT initialized?
|
||||||
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
|
FPRINTF_S(stderr, "<TARGET> ERROR %s\n",
|
||||||
"invalid TCP socket");
|
"invalid TCP socket");
|
||||||
@ -230,7 +229,6 @@ void QS::onFlush() {
|
|||||||
}
|
}
|
||||||
else if (nSent < (int)nBytes) { // sent fewer than requested?
|
else if (nSent < (int)nBytes) { // sent fewer than requested?
|
||||||
Sleep(QS_TIMEOUT_MS); // sleep for the timeout
|
Sleep(QS_TIMEOUT_MS); // sleep for the timeout
|
||||||
|
|
||||||
// adjust the data and loop back to send() the rest
|
// adjust the data and loop back to send() the rest
|
||||||
data += nSent;
|
data += nSent;
|
||||||
nBytes -= (uint16_t)nSent;
|
nBytes -= (uint16_t)nSent;
|
||||||
@ -243,6 +241,7 @@ void QS::onFlush() {
|
|||||||
nBytes = QS_TX_CHUNK;
|
nBytes = QS_TX_CHUNK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//............................................................................
|
//............................................................................
|
||||||
void QS::onTestLoop() {
|
void QS::onTestLoop() {
|
||||||
fd_set readSet;
|
fd_set readSet;
|
||||||
@ -281,5 +280,20 @@ void QS::onTestLoop() {
|
|||||||
rxPriv_.inTestLoop = true;
|
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
|
} // namespace QP
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com/licensing>
|
// <www.state-machine.com/licensing>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2024-02-16
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_3
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QF/C++ port to Win32 (single-threaded, like the QV kernel)
|
//! @brief QF/C++ port to Win32 (single-threaded, like the QV kernel)
|
||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qf_port")
|
Q_THIS_MODULE("qf_port");
|
||||||
|
|
||||||
// Local objects =============================================================
|
// Local objects =============================================================
|
||||||
static DWORD l_tickMsec = 10U; // clock tick in msec (argument for Sleep())
|
static DWORD l_tickMsec = 10U; // clock tick in msec (argument for Sleep())
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com>
|
// <www.state-machine.com>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2023-12-13
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_2
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QS/C++ port to Win32 API
|
//! @brief QS/C++ port to Win32 API
|
||||||
@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
//Q_DEFINE_THIS_MODULE("qs_port")
|
//Q_THIS_MODULE("qs_port");
|
||||||
|
|
||||||
// local variables ...........................................................
|
// local variables ...........................................................
|
||||||
static SOCKET l_sock = INVALID_SOCKET;
|
static SOCKET l_sock = INVALID_SOCKET;
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com/licensing>
|
// <www.state-machine.com/licensing>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2024-02-16
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_3
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QF/C++ port to Win32 (multithreaded)
|
//! @brief QF/C++ port to Win32 (multithreaded)
|
||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qf_port")
|
Q_THIS_MODULE("qf_port");
|
||||||
|
|
||||||
// Local objects =============================================================
|
// Local objects =============================================================
|
||||||
static CRITICAL_SECTION l_startupCritSect;
|
static CRITICAL_SECTION l_startupCritSect;
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com>
|
// <www.state-machine.com>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2023-12-13
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpcpp_7_3_2
|
//! @version Last updated for: @ref qpcpp_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QS/C++ port to Win32 API
|
//! @brief QS/C++ port to Win32 API
|
||||||
@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
//Q_DEFINE_THIS_MODULE("qs_port")
|
//Q_THIS_MODULE("qs_port");
|
||||||
|
|
||||||
// local variables ...........................................................
|
// local variables ...........................................................
|
||||||
static SOCKET l_sock = INVALID_SOCKET;
|
static SOCKET l_sock = INVALID_SOCKET;
|
||||||
|
136
qpcpp.qm
136
qpcpp.qm
@ -567,9 +567,9 @@ QStateHandler t = s;
|
|||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
|
|
||||||
QF_CRIT_ENTRY();
|
QF_CRIT_ENTRY();
|
||||||
|
Q_REQUIRE_INCRIT(300, QEvt::verify_(e));
|
||||||
Q_INVARIANT_INCRIT(302, (s != Q_STATE_CAST(0))
|
Q_INVARIANT_INCRIT(302, (s != Q_STATE_CAST(0))
|
||||||
&& (m_state.uint == static_cast<std::uintptr_t>(~m_temp.uint)));
|
&& (m_state.uint == static_cast<std::uintptr_t>(~m_temp.uint)));
|
||||||
Q_INVARIANT_INCRIT(303, QEvt::verify_(e));
|
|
||||||
|
|
||||||
QS_MEM_SYS();
|
QS_MEM_SYS();
|
||||||
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
|
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
|
||||||
@ -823,6 +823,8 @@ do {
|
|||||||
|
|
||||||
#ifndef Q_UNSAFE
|
#ifndef Q_UNSAFE
|
||||||
m_temp.uint = ~m_state.uint;
|
m_temp.uint = ~m_state.uint;
|
||||||
|
#else
|
||||||
|
Q_UNUSED_PAR(isFound);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
@ -1094,9 +1096,9 @@ QMState const *t = s;
|
|||||||
|
|
||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
QF_CRIT_ENTRY();
|
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)));
|
&& (m_state.uint == static_cast<std::uintptr_t>(~m_temp.uint)));
|
||||||
Q_INVARIANT_INCRIT(302, QEvt::verify_(e));
|
|
||||||
|
|
||||||
QS_MEM_SYS();
|
QS_MEM_SYS();
|
||||||
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
|
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
|
||||||
@ -2170,8 +2172,10 @@ QF_CRIT_ENTRY();
|
|||||||
QF_MEM_SYS();
|
QF_MEM_SYS();
|
||||||
|
|
||||||
#ifndef Q_UNSAFE
|
#ifndef Q_UNSAFE
|
||||||
|
Q_REQUIRE_INCRIT(100, QEvt::verify_(e));
|
||||||
|
|
||||||
std::uint8_t const pcopy = static_cast<std::uint8_t>(~m_prio_dis);
|
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
|
#endif
|
||||||
|
|
||||||
QEQueueCtr nFree = m_eQueue.m_nFree; // get volatile into temporary
|
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:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
QS::onTestPost(sender, this, e, status);
|
QS::onTestPost(sender, this, e, status);
|
||||||
|
|
||||||
|
QF_CRIT_ENTRY();
|
||||||
|
QF_MEM_SYS();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2276,7 +2286,13 @@ else { // cannot post the event
|
|||||||
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
QS::onTestPost(sender, this, e, status);
|
QS::onTestPost(sender, this, e, status);
|
||||||
|
|
||||||
|
QF_CRIT_ENTRY();
|
||||||
|
QF_MEM_SYS();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2309,8 +2325,10 @@ QF_CRIT_ENTRY();
|
|||||||
QF_MEM_SYS();
|
QF_MEM_SYS();
|
||||||
|
|
||||||
#ifndef Q_UNSAFE
|
#ifndef Q_UNSAFE
|
||||||
|
Q_REQUIRE_INCRIT(200, QEvt::verify_(e));
|
||||||
|
|
||||||
std::uint8_t const pcopy = static_cast<std::uint8_t>(~m_prio_dis);
|
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
|
#endif
|
||||||
|
|
||||||
#ifdef QXK_HPP_
|
#ifdef QXK_HPP_
|
||||||
@ -2351,7 +2369,13 @@ QS_END_PRE_()
|
|||||||
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
QS::onTestPost(nullptr, this, e, true);
|
QS::onTestPost(nullptr, this, e, true);
|
||||||
|
|
||||||
|
QF_CRIT_ENTRY();
|
||||||
|
QF_MEM_SYS();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2384,6 +2408,8 @@ QACTIVE_EQUEUE_WAIT_(this); // wait for event to arrive directly
|
|||||||
|
|
||||||
// always remove evt from the front
|
// always remove evt from the front
|
||||||
QEvt const * const e = m_eQueue.m_frontEvt;
|
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
|
QEQueueCtr const nFree = m_eQueue.m_nFree + 1U; // get volatile into tmp
|
||||||
m_eQueue.m_nFree = nFree; // update the # free
|
m_eQueue.m_nFree = nFree; // update the # free
|
||||||
|
|
||||||
@ -3542,7 +3568,7 @@ QF_CRIT_STAT
|
|||||||
QF_CRIT_ENTRY();
|
QF_CRIT_ENTRY();
|
||||||
QF_MEM_SYS();
|
QF_MEM_SYS();
|
||||||
|
|
||||||
Q_REQUIRE_INCRIT(200, e != nullptr);
|
Q_REQUIRE_INCRIT(200, QEvt::verify_(e));
|
||||||
|
|
||||||
QEQueueCtr nFree = m_nFree; // get volatile into temporary
|
QEQueueCtr nFree = m_nFree; // get volatile into temporary
|
||||||
|
|
||||||
@ -3622,9 +3648,10 @@ QF_CRIT_STAT
|
|||||||
QF_CRIT_ENTRY();
|
QF_CRIT_ENTRY();
|
||||||
QF_MEM_SYS();
|
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?
|
if (e->getPoolNum_() != 0U) { // is it a mutable event?
|
||||||
QEvt_refCtr_inc_(e); // increment the reference counter
|
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
|
QEvt const * const e = m_frontEvt; // always remove evt from the front
|
||||||
|
|
||||||
if (e != nullptr) { // was the queue not empty?
|
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;
|
QEQueueCtr const nFree = m_nFree + 1U;
|
||||||
m_nFree = nFree; // update the # free
|
m_nFree = nFree; // update the # free
|
||||||
|
|
||||||
@ -3698,7 +3728,7 @@ if (e != nullptr) { // was the queue not empty?
|
|||||||
m_frontEvt = nullptr; // queue becomes empty
|
m_frontEvt = nullptr; // queue becomes empty
|
||||||
|
|
||||||
// all entries in the queue must be free (+1 for fronEvt)
|
// 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_BEGIN_PRE_(QS_QF_EQUEUE_GET_LAST, qsId)
|
||||||
QS_TIME_PRE_(); // timestamp
|
QS_TIME_PRE_(); // timestamp
|
||||||
@ -4256,7 +4286,7 @@ return e;</code>
|
|||||||
<parameter name="e" type="QEvt const * const"/>
|
<parameter name="e" type="QEvt const * const"/>
|
||||||
<code>QF_CRIT_STAT
|
<code>QF_CRIT_STAT
|
||||||
QF_CRIT_ENTRY();
|
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_();
|
std::uint_fast8_t const poolNum = e->getPoolNum_();
|
||||||
|
|
||||||
@ -4321,11 +4351,12 @@ Q_UNUSED_PAR(evtRef);
|
|||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
QF_CRIT_ENTRY();
|
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_();
|
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));
|
&& (evtRef == nullptr));
|
||||||
|
|
||||||
QEvt_refCtr_inc_(e); // increments the ref counter
|
QEvt_refCtr_inc_(e); // increments the ref counter
|
||||||
@ -4348,11 +4379,11 @@ return e;</code>
|
|||||||
<specifiers>noexcept</specifiers>
|
<specifiers>noexcept</specifiers>
|
||||||
<!--${QF::QF-dyn::deleteRef_::evtRef}-->
|
<!--${QF::QF-dyn::deleteRef_::evtRef}-->
|
||||||
<parameter name="evtRef" type="QEvt const * const"/>
|
<parameter name="evtRef" type="QEvt const * const"/>
|
||||||
<code>QEvt const * const e = evtRef;
|
<code>QF_CRIT_STAT
|
||||||
|
|
||||||
QF_CRIT_STAT
|
|
||||||
QF_CRIT_ENTRY();
|
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
|
#ifdef Q_SPY
|
||||||
std::uint_fast8_t const poolNum = e->getPoolNum_();
|
std::uint_fast8_t const poolNum = e->getPoolNum_();
|
||||||
@ -4370,7 +4401,7 @@ QS_MEM_APP();
|
|||||||
QF_CRIT_EXIT();
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
#if (QF_MAX_EPOOL > 0U)
|
#if (QF_MAX_EPOOL > 0U)
|
||||||
gc(evtRef); // recycle the referenced event
|
gc(e); // recycle the referenced event
|
||||||
#endif</code>
|
#endif</code>
|
||||||
</operation>
|
</operation>
|
||||||
<!--${QF::QF-dyn::q_new}-->
|
<!--${QF::QF-dyn::q_new}-->
|
||||||
@ -7698,15 +7729,15 @@ QS::tstPriv_.readySet.update_(&QS::tstPriv_.readySet_dis);
|
|||||||
</operation>
|
</operation>
|
||||||
<!--${QS::QUTest-stub::QF::run}-->
|
<!--${QS::QUTest-stub::QF::run}-->
|
||||||
<operation name="run" type="int_t" visibility="0x00" properties="0x01">
|
<operation name="run" type="int_t" visibility="0x00" properties="0x01">
|
||||||
<code>QS_CRIT_STAT
|
<code>// function dictionaries for the standard API
|
||||||
QS_CRIT_ENTRY();
|
|
||||||
QS_MEM_SYS();
|
|
||||||
|
|
||||||
// function dictionaries for the standard API
|
|
||||||
QS_FUN_DICTIONARY(&QActive::post_);
|
QS_FUN_DICTIONARY(&QActive::post_);
|
||||||
QS_FUN_DICTIONARY(&QActive::postLIFO);
|
QS_FUN_DICTIONARY(&QActive::postLIFO);
|
||||||
QS_FUN_DICTIONARY(&QS::processTestEvts_);
|
QS_FUN_DICTIONARY(&QS::processTestEvts_);
|
||||||
|
|
||||||
|
QS_CRIT_STAT
|
||||||
|
QS_CRIT_ENTRY();
|
||||||
|
QS_MEM_SYS();
|
||||||
|
|
||||||
// produce the QS_QF_RUN trace record
|
// produce the QS_QF_RUN trace record
|
||||||
QS_BEGIN_PRE_(QS_QF_RUN, 0U)
|
QS_BEGIN_PRE_(QS_QF_RUN, 0U)
|
||||||
QS_END_PRE_()
|
QS_END_PRE_()
|
||||||
@ -8016,14 +8047,15 @@ QS_BEGIN_PRE_(rec, m_prio)
|
|||||||
QS_EQC_PRE_(margin); // margin requested
|
QS_EQC_PRE_(margin); // margin requested
|
||||||
QS_END_PRE_()
|
QS_END_PRE_()
|
||||||
|
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
// callback to examine the posted event under the same conditions
|
// callback to examine the posted event under the same conditions
|
||||||
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
QS::onTestPost(sender, this, e, status);
|
QS::onTestPost(sender, this, e, status);
|
||||||
}
|
}
|
||||||
QF_MEM_APP();
|
|
||||||
QF_CRIT_EXIT();
|
|
||||||
|
|
||||||
// recycle the event immediately, because it was not really posted
|
// recycle the event immediately, because it was not really posted
|
||||||
#if (QF_MAX_EPOOL > 0U)
|
#if (QF_MAX_EPOOL > 0U)
|
||||||
@ -8063,15 +8095,15 @@ QS_BEGIN_PRE_(QS_QF_ACTIVE_POST_LIFO, m_prio)
|
|||||||
QS_EQC_PRE_(0U); // min # free entries
|
QS_EQC_PRE_(0U); // min # free entries
|
||||||
QS_END_PRE_()
|
QS_END_PRE_()
|
||||||
|
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
// callback to examine the posted event under the same conditions
|
// callback to examine the posted event under the same conditions
|
||||||
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
QS::onTestPost(nullptr, this, e, true);
|
QS::onTestPost(nullptr, this, e, true);
|
||||||
}
|
}
|
||||||
QF_MEM_APP();
|
|
||||||
QF_CRIT_EXIT();
|
|
||||||
|
|
||||||
// recycle the event immediately, because it was not really posted
|
// recycle the event immediately, because it was not really posted
|
||||||
#if (QF_MAX_EPOOL > 0U)
|
#if (QF_MAX_EPOOL > 0U)
|
||||||
QF::gc(e);
|
QF::gc(e);
|
||||||
@ -9383,6 +9415,14 @@ extern char const BUILD_TIME[9];
|
|||||||
//! @deprecated plain 'char' is no longer forbidden in MISRA/AUTOSAR-C++
|
//! @deprecated plain 'char' is no longer forbidden in MISRA/AUTOSAR-C++
|
||||||
using char_t = char;
|
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
|
//! @deprecated assertion failure handler
|
||||||
//! Use Q_onError() instead.
|
//! Use Q_onError() instead.
|
||||||
#define Q_onAssert(module_, id_) Q_onError(module_, id_)
|
#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
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qep_hsm")
|
Q_THIS_MODULE("qep_hsm");
|
||||||
|
|
||||||
// immutable events corresponding to the reserved signals.
|
// immutable events corresponding to the reserved signals.
|
||||||
static QP::QEvt const l_reservedEvt_[4] {
|
static QP::QEvt const l_reservedEvt_[4] {
|
||||||
@ -9653,7 +9693,7 @@ $define ${QEP::QHsm}</text>
|
|||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qep_msm")
|
Q_THIS_MODULE("qep_msm");
|
||||||
|
|
||||||
// maximum depth of state nesting in a QMsm (including the top level)
|
// maximum depth of state nesting in a QMsm (including the top level)
|
||||||
static constexpr std::int_fast8_t MAX_NEST_DEPTH_ {6};
|
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
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
//Q_DEFINE_THIS_MODULE("qf_act")
|
//Q_THIS_MODULE("qf_act");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QActive::registry_[QF_MAX_ACTIVE + 1U]}
|
$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
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_actq")
|
Q_THIS_MODULE("qf_actq");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QActive::post_}
|
$define ${QF::QActive::post_}
|
||||||
@ -9746,7 +9786,7 @@ $define ${QF::QTicker}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_defer")
|
Q_THIS_MODULE("qf_defer");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QActive::defer}
|
$define ${QF::QActive::defer}
|
||||||
@ -9772,7 +9812,7 @@ $define ${QF::QActive::flushDeferred}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_dyn")
|
Q_THIS_MODULE("qf_dyn");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QF-dyn}
|
$define ${QF::QF-dyn}
|
||||||
@ -9794,7 +9834,7 @@ $define ${QF::QF-dyn}
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_mem")
|
Q_THIS_MODULE("qf_mem");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QMPool}</text>
|
$define ${QF::QMPool}</text>
|
||||||
@ -9814,7 +9854,7 @@ $define ${QF::QMPool}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_qact")
|
Q_THIS_MODULE("qf_qact");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QActive::QActive}
|
$define ${QF::QActive::QActive}
|
||||||
@ -9838,7 +9878,7 @@ $define ${QF::QActive::unregister_}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
//Q_DEFINE_THIS_MODULE("qf_qmact")
|
//Q_THIS_MODULE("qf_qmact");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QMActive}</text>
|
$define ${QF::QMActive}</text>
|
||||||
@ -9858,7 +9898,7 @@ $define ${QF::QMActive}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_qeq")
|
Q_THIS_MODULE("qf_qeq");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QEQueue}</text>
|
$define ${QF::QEQueue}</text>
|
||||||
@ -9878,7 +9918,7 @@ $define ${QF::QEQueue}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_ps")
|
Q_THIS_MODULE("qf_ps");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QActive::subscrList_}
|
$define ${QF::QActive::subscrList_}
|
||||||
@ -9910,7 +9950,7 @@ $define ${QF::QActive::unsubscribeAll}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_time")
|
Q_THIS_MODULE("qf_time");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QF::QTimeEvt}</text>
|
$define ${QF::QTimeEvt}</text>
|
||||||
@ -9938,7 +9978,7 @@ $define ${QF::QTimeEvt}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qv")
|
Q_THIS_MODULE("qv");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QV::QV-base}
|
$define ${QV::QV-base}
|
||||||
@ -9970,7 +10010,7 @@ $define ${QV::QActive}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qk")
|
Q_THIS_MODULE("qk");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QK::QK-base}
|
$define ${QK::QK-base}
|
||||||
@ -10006,7 +10046,7 @@ $define ${QK::QActive}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qxk")
|
Q_THIS_MODULE("qxk");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QXK::QXK-base}
|
$define ${QXK::QXK-base}
|
||||||
@ -10039,7 +10079,7 @@ $define ${QXK::QActive}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qxk_mutex")
|
Q_THIS_MODULE("qxk_mutex");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QXK::QXMutex}</text>
|
$define ${QXK::QXMutex}</text>
|
||||||
@ -10064,7 +10104,7 @@ $define ${QXK::QXMutex}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qxk_sema")
|
Q_THIS_MODULE("qxk_sema");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QXK::QXSemaphore}</text>
|
$define ${QXK::QXSemaphore}</text>
|
||||||
@ -10089,7 +10129,7 @@ $define ${QXK::QXSemaphore}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qxk_xthr")
|
Q_THIS_MODULE("qxk_xthr");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QXK::QXThread}</text>
|
$define ${QXK::QXThread}</text>
|
||||||
@ -10107,7 +10147,7 @@ $define ${QXK::QXThread}</text>
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qs")
|
Q_THIS_MODULE("qs");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
$define ${QS::QS-TX}
|
$define ${QS::QS-TX}
|
||||||
@ -11187,7 +11227,7 @@ void f64_fmt_(
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qs_rx")
|
Q_THIS_MODULE("qs_rx");
|
||||||
|
|
||||||
enum RxStateEnum : std::uint8_t {
|
enum RxStateEnum : std::uint8_t {
|
||||||
ERROR_STATE,
|
ERROR_STATE,
|
||||||
@ -12355,7 +12395,7 @@ Q_NORETURN Q_onError(
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qutest")
|
Q_THIS_MODULE("qutest");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
namespace QP {
|
namespace QP {
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qep_hsm")
|
Q_THIS_MODULE("qep_hsm");
|
||||||
|
|
||||||
// immutable events corresponding to the reserved signals.
|
// immutable events corresponding to the reserved signals.
|
||||||
static QP::QEvt const l_reservedEvt_[4] {
|
static QP::QEvt const l_reservedEvt_[4] {
|
||||||
@ -254,9 +254,9 @@ void QHsm::dispatch(
|
|||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
|
|
||||||
QF_CRIT_ENTRY();
|
QF_CRIT_ENTRY();
|
||||||
|
Q_REQUIRE_INCRIT(300, QEvt::verify_(e));
|
||||||
Q_INVARIANT_INCRIT(302, (s != Q_STATE_CAST(0))
|
Q_INVARIANT_INCRIT(302, (s != Q_STATE_CAST(0))
|
||||||
&& (m_state.uint == static_cast<std::uintptr_t>(~m_temp.uint)));
|
&& (m_state.uint == static_cast<std::uintptr_t>(~m_temp.uint)));
|
||||||
Q_INVARIANT_INCRIT(303, QEvt::verify_(e));
|
|
||||||
|
|
||||||
QS_MEM_SYS();
|
QS_MEM_SYS();
|
||||||
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
|
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
|
||||||
@ -506,6 +506,8 @@ QStateHandler QHsm::childState(QStateHandler const parent) noexcept {
|
|||||||
|
|
||||||
#ifndef Q_UNSAFE
|
#ifndef Q_UNSAFE
|
||||||
m_temp.uint = ~m_state.uint;
|
m_temp.uint = ~m_state.uint;
|
||||||
|
#else
|
||||||
|
Q_UNUSED_PAR(isFound);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qep_msm")
|
Q_THIS_MODULE("qep_msm");
|
||||||
|
|
||||||
// maximum depth of state nesting in a QMsm (including the top level)
|
// maximum depth of state nesting in a QMsm (including the top level)
|
||||||
static constexpr std::int_fast8_t MAX_NEST_DEPTH_ {6};
|
static constexpr std::int_fast8_t MAX_NEST_DEPTH_ {6};
|
||||||
@ -177,9 +177,9 @@ void QMsm::dispatch(
|
|||||||
|
|
||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
QF_CRIT_ENTRY();
|
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)));
|
&& (m_state.uint == static_cast<std::uintptr_t>(~m_temp.uint)));
|
||||||
Q_INVARIANT_INCRIT(302, QEvt::verify_(e));
|
|
||||||
|
|
||||||
QS_MEM_SYS();
|
QS_MEM_SYS();
|
||||||
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
|
QS_BEGIN_PRE_(QS_QEP_DISPATCH, qsId)
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
//Q_DEFINE_THIS_MODULE("qf_act")
|
//Q_THIS_MODULE("qf_act");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_actq")
|
Q_THIS_MODULE("qf_actq");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
@ -90,8 +90,10 @@ bool QActive::post_(
|
|||||||
QF_MEM_SYS();
|
QF_MEM_SYS();
|
||||||
|
|
||||||
#ifndef Q_UNSAFE
|
#ifndef Q_UNSAFE
|
||||||
|
Q_REQUIRE_INCRIT(100, QEvt::verify_(e));
|
||||||
|
|
||||||
std::uint8_t const pcopy = static_cast<std::uint8_t>(~m_prio_dis);
|
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
|
#endif
|
||||||
|
|
||||||
QEQueueCtr nFree = m_eQueue.m_nFree; // get volatile into temporary
|
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:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
QS::onTestPost(sender, this, e, status);
|
QS::onTestPost(sender, this, e, status);
|
||||||
|
|
||||||
|
QF_CRIT_ENTRY();
|
||||||
|
QF_MEM_SYS();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -196,7 +204,13 @@ bool QActive::post_(
|
|||||||
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
QS::onTestPost(sender, this, e, status);
|
QS::onTestPost(sender, this, e, status);
|
||||||
|
|
||||||
|
QF_CRIT_ENTRY();
|
||||||
|
QF_MEM_SYS();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -233,8 +247,10 @@ void QActive::postLIFO(QEvt const * const e) noexcept {
|
|||||||
QF_MEM_SYS();
|
QF_MEM_SYS();
|
||||||
|
|
||||||
#ifndef Q_UNSAFE
|
#ifndef Q_UNSAFE
|
||||||
|
Q_REQUIRE_INCRIT(200, QEvt::verify_(e));
|
||||||
|
|
||||||
std::uint8_t const pcopy = static_cast<std::uint8_t>(~m_prio_dis);
|
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
|
#endif
|
||||||
|
|
||||||
#ifdef QXK_HPP_
|
#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:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
QS::onTestPost(nullptr, this, e, true);
|
QS::onTestPost(nullptr, this, e, true);
|
||||||
|
|
||||||
|
QF_CRIT_ENTRY();
|
||||||
|
QF_MEM_SYS();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -314,6 +336,8 @@ QEvt const * QActive::get_() noexcept {
|
|||||||
|
|
||||||
// always remove evt from the front
|
// always remove evt from the front
|
||||||
QEvt const * const e = m_eQueue.m_frontEvt;
|
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
|
QEQueueCtr const nFree = m_eQueue.m_nFree + 1U; // get volatile into tmp
|
||||||
m_eQueue.m_nFree = nFree; // update the # free
|
m_eQueue.m_nFree = nFree; // update the # free
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_defer")
|
Q_THIS_MODULE("qf_defer");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_dyn")
|
Q_THIS_MODULE("qf_dyn");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
@ -222,7 +222,7 @@ QEvt * newX_(
|
|||||||
void gc(QEvt const * const e) noexcept {
|
void gc(QEvt const * const e) noexcept {
|
||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
QF_CRIT_ENTRY();
|
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_();
|
std::uint_fast8_t const poolNum = e->getPoolNum_();
|
||||||
|
|
||||||
@ -286,11 +286,12 @@ QEvt const * newRef_(
|
|||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
QF_CRIT_ENTRY();
|
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_();
|
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));
|
&& (evtRef == nullptr));
|
||||||
|
|
||||||
QEvt_refCtr_inc_(e); // increments the ref counter
|
QEvt_refCtr_inc_(e); // increments the ref counter
|
||||||
@ -311,11 +312,11 @@ QEvt const * newRef_(
|
|||||||
|
|
||||||
//${QF::QF-dyn::deleteRef_} ..................................................
|
//${QF::QF-dyn::deleteRef_} ..................................................
|
||||||
void deleteRef_(QEvt const * const evtRef) noexcept {
|
void deleteRef_(QEvt const * const evtRef) noexcept {
|
||||||
QEvt const * const e = evtRef;
|
|
||||||
|
|
||||||
QF_CRIT_STAT
|
QF_CRIT_STAT
|
||||||
QF_CRIT_ENTRY();
|
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
|
#ifdef Q_SPY
|
||||||
std::uint_fast8_t const poolNum = e->getPoolNum_();
|
std::uint_fast8_t const poolNum = e->getPoolNum_();
|
||||||
@ -333,7 +334,7 @@ void deleteRef_(QEvt const * const evtRef) noexcept {
|
|||||||
QF_CRIT_EXIT();
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
#if (QF_MAX_EPOOL > 0U)
|
#if (QF_MAX_EPOOL > 0U)
|
||||||
gc(evtRef); // recycle the referenced event
|
gc(e); // recycle the referenced event
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_mem")
|
Q_THIS_MODULE("qf_mem");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_ps")
|
Q_THIS_MODULE("qf_ps");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_qact")
|
Q_THIS_MODULE("qf_qact");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_qeq")
|
Q_THIS_MODULE("qf_qeq");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
@ -109,7 +109,7 @@ bool QEQueue::post(
|
|||||||
QF_CRIT_ENTRY();
|
QF_CRIT_ENTRY();
|
||||||
QF_MEM_SYS();
|
QF_MEM_SYS();
|
||||||
|
|
||||||
Q_REQUIRE_INCRIT(200, e != nullptr);
|
Q_REQUIRE_INCRIT(200, QEvt::verify_(e));
|
||||||
|
|
||||||
QEQueueCtr nFree = m_nFree; // get volatile into temporary
|
QEQueueCtr nFree = m_nFree; // get volatile into temporary
|
||||||
|
|
||||||
@ -188,9 +188,10 @@ void QEQueue::postLIFO(
|
|||||||
QF_CRIT_ENTRY();
|
QF_CRIT_ENTRY();
|
||||||
QF_MEM_SYS();
|
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?
|
if (e->getPoolNum_() != 0U) { // is it a mutable event?
|
||||||
QEvt_refCtr_inc_(e); // increment the reference counter
|
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
|
QEvt const * const e = m_frontEvt; // always remove evt from the front
|
||||||
|
|
||||||
if (e != nullptr) { // was the queue not empty?
|
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;
|
QEQueueCtr const nFree = m_nFree + 1U;
|
||||||
m_nFree = nFree; // update the # free
|
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
|
m_frontEvt = nullptr; // queue becomes empty
|
||||||
|
|
||||||
// all entries in the queue must be free (+1 for fronEvt)
|
// 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_BEGIN_PRE_(QS_QF_EQUEUE_GET_LAST, qsId)
|
||||||
QS_TIME_PRE_(); // timestamp
|
QS_TIME_PRE_(); // timestamp
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
//Q_DEFINE_THIS_MODULE("qf_qmact")
|
//Q_THIS_MODULE("qf_qmact");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qf_time")
|
Q_THIS_MODULE("qf_time");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qk")
|
Q_THIS_MODULE("qk");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qs")
|
Q_THIS_MODULE("qs");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed local namespace
|
namespace { // unnamed local namespace
|
||||||
|
|
||||||
Q_DEFINE_THIS_MODULE("qs_rx")
|
Q_THIS_MODULE("qs_rx");
|
||||||
|
|
||||||
enum RxStateEnum : std::uint8_t {
|
enum RxStateEnum : std::uint8_t {
|
||||||
ERROR_STATE,
|
ERROR_STATE,
|
||||||
|
@ -154,7 +154,7 @@ Q_NORETURN Q_onError(
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qutest")
|
Q_THIS_MODULE("qutest");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
namespace QP {
|
namespace QP {
|
||||||
@ -212,15 +212,15 @@ void stop() {
|
|||||||
|
|
||||||
//${QS::QUTest-stub::QF::run} ................................................
|
//${QS::QUTest-stub::QF::run} ................................................
|
||||||
int_t run() {
|
int_t run() {
|
||||||
QS_CRIT_STAT
|
|
||||||
QS_CRIT_ENTRY();
|
|
||||||
QS_MEM_SYS();
|
|
||||||
|
|
||||||
// function dictionaries for the standard API
|
// function dictionaries for the standard API
|
||||||
QS_FUN_DICTIONARY(&QActive::post_);
|
QS_FUN_DICTIONARY(&QActive::post_);
|
||||||
QS_FUN_DICTIONARY(&QActive::postLIFO);
|
QS_FUN_DICTIONARY(&QActive::postLIFO);
|
||||||
QS_FUN_DICTIONARY(&QS::processTestEvts_);
|
QS_FUN_DICTIONARY(&QS::processTestEvts_);
|
||||||
|
|
||||||
|
QS_CRIT_STAT
|
||||||
|
QS_CRIT_ENTRY();
|
||||||
|
QS_MEM_SYS();
|
||||||
|
|
||||||
// produce the QS_QF_RUN trace record
|
// produce the QS_QF_RUN trace record
|
||||||
QS_BEGIN_PRE_(QS_QF_RUN, 0U)
|
QS_BEGIN_PRE_(QS_QF_RUN, 0U)
|
||||||
QS_END_PRE_()
|
QS_END_PRE_()
|
||||||
@ -522,14 +522,15 @@ bool QActiveDummy::fakePost(
|
|||||||
QS_EQC_PRE_(margin); // margin requested
|
QS_EQC_PRE_(margin); // margin requested
|
||||||
QS_END_PRE_()
|
QS_END_PRE_()
|
||||||
|
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
// callback to examine the posted event under the same conditions
|
// callback to examine the posted event under the same conditions
|
||||||
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
QS::onTestPost(sender, this, e, status);
|
QS::onTestPost(sender, this, e, status);
|
||||||
}
|
}
|
||||||
QF_MEM_APP();
|
|
||||||
QF_CRIT_EXIT();
|
|
||||||
|
|
||||||
// recycle the event immediately, because it was not really posted
|
// recycle the event immediately, because it was not really posted
|
||||||
#if (QF_MAX_EPOOL > 0U)
|
#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_EQC_PRE_(0U); // min # free entries
|
||||||
QS_END_PRE_()
|
QS_END_PRE_()
|
||||||
|
|
||||||
|
QF_MEM_APP();
|
||||||
|
QF_CRIT_EXIT();
|
||||||
|
|
||||||
// callback to examine the posted event under the same conditions
|
// callback to examine the posted event under the same conditions
|
||||||
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
// as producing the #QS_QF_ACTIVE_POST trace record, which are:
|
||||||
// the local filter for this AO ('m_prio') is set
|
// the local filter for this AO ('m_prio') is set
|
||||||
if (QS_LOC_CHECK_(m_prio)) {
|
if (QS_LOC_CHECK_(m_prio)) {
|
||||||
QS::onTestPost(nullptr, this, e, true);
|
QS::onTestPost(nullptr, this, e, true);
|
||||||
}
|
}
|
||||||
QF_MEM_APP();
|
|
||||||
QF_CRIT_EXIT();
|
|
||||||
|
|
||||||
// recycle the event immediately, because it was not really posted
|
// recycle the event immediately, because it was not really posted
|
||||||
#if (QF_MAX_EPOOL > 0U)
|
#if (QF_MAX_EPOOL > 0U)
|
||||||
QF::gc(e);
|
QF::gc(e);
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qv")
|
Q_THIS_MODULE("qv");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qxk")
|
Q_THIS_MODULE("qxk");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qxk_mutex")
|
Q_THIS_MODULE("qxk_mutex");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qxk_sema")
|
Q_THIS_MODULE("qxk_sema");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
// unnamed namespace for local definitions with internal linkage
|
// unnamed namespace for local definitions with internal linkage
|
||||||
namespace {
|
namespace {
|
||||||
Q_DEFINE_THIS_MODULE("qxk_xthr")
|
Q_THIS_MODULE("qxk_xthr");
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
//$skip${QP_VERSION} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
// Local-scope objects -------------------------------------------------------
|
// Local-scope objects -------------------------------------------------------
|
||||||
#define LED_PORT gpioPortF
|
#define LED_PORT gpioPortF
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
// Local-scope objects -----------------------------------------------------
|
// Local-scope objects -----------------------------------------------------
|
||||||
// LED pins available on the board (just one user LED LD4--Green on PA.5)
|
// LED pins available on the board (just one user LED LD4--Green on PA.5)
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
#ifdef Q_SPY
|
#ifdef Q_SPY
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
// Local-scope objects -------------------------------------------------------
|
// Local-scope objects -------------------------------------------------------
|
||||||
// LED pins available on the board (just one user LED LD2--Green on PA.5)
|
// LED pins available on the board (just one user LED LD2--Green on PA.5)
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include "qpcpp.hpp"
|
#include "qpcpp.hpp"
|
||||||
#include "bsp.hpp"
|
#include "bsp.hpp"
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
// Local-scope objects -------------------------------------------------------
|
// Local-scope objects -------------------------------------------------------
|
||||||
#define LED_PORT gpioPortF
|
#define LED_PORT gpioPortF
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
// Local-scope objects -----------------------------------------------------
|
// Local-scope objects -----------------------------------------------------
|
||||||
// LED pins available on the board (just one user LED LD4--Green on PA.5)
|
// LED pins available on the board (just one user LED LD4--Green on PA.5)
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
#ifdef Q_SPY
|
#ifdef Q_SPY
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
// Local-scope objects -------------------------------------------------------
|
// Local-scope objects -------------------------------------------------------
|
||||||
// LED pins available on the board (just one user LED LD2--Green on PA.5)
|
// LED pins available on the board (just one user LED LD2--Green on PA.5)
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include "qpcpp.hpp"
|
#include "qpcpp.hpp"
|
||||||
#include "bsp.hpp"
|
#include "bsp.hpp"
|
||||||
|
|
||||||
Q_DEFINE_THIS_FILE
|
Q_THIS_FILE();
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
// <www.state-machine.com>
|
// <www.state-machine.com>
|
||||||
// <info@state-machine.com>
|
// <info@state-machine.com>
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//! @date Last updated on: 2024-01-03
|
//! @date Last updated on: 2024-06-11
|
||||||
//! @version Last updated for: @ref qpc_7_3_2
|
//! @version Last updated for: @ref qpc_7_4_0
|
||||||
//!
|
//!
|
||||||
//! @file
|
//! @file
|
||||||
//! @brief QF/C++ port to Zephyr RTOS kernel, all supported compilers
|
//! @brief QF/C++ port to Zephyr RTOS kernel, all supported compilers
|
||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
namespace { // unnamed namespace
|
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
|
static void thread_entry(void *p1, void *p2, void *p3) { // Zephyr signature
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
// Product: QUTEST port for Zephyr RTOS
|
// Product: QUTEST port for Zephyr RTOS
|
||||||
// Last updated for version 7.3.2
|
// Last updated for version 7.4.0
|
||||||
// Last updated on 2023-12-13
|
// Last updated on 2024-06-11
|
||||||
//
|
//
|
||||||
// Q u a n t u m L e a P s
|
// Q u a n t u m L e a P s
|
||||||
// ------------------------
|
// ------------------------
|
||||||
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
//Q_DEFINE_THIS_MODULE("qutest_port")
|
//Q_THIS_MODULE("qutest_port");
|
||||||
|
|
||||||
// select the Zephyr shell UART
|
// select the Zephyr shell UART
|
||||||
// NOTE: you can change this to other UART peripheral if desired
|
// NOTE: you can change this to other UART peripheral if desired
|
||||||
|
Loading…
x
Reference in New Issue
Block a user