Skip to content

Commit d9a3850

Browse files
committed
8.0.5
1 parent fa83cb0 commit d9a3850

File tree

15 files changed

+118
-92
lines changed

15 files changed

+118
-92
lines changed

LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
QP/C++ Real-Time Event Framework (RTEF)
2+
3+
Copyright (C) 2005-2025 Quantum Leaps, LLC. All rights reserved.
4+
5+
Q u a n t u m L e a P s
6+
------------------------
7+
Modern Embedded Software
8+
9+
SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
10+
11+
This software is dual-licensed under the terms of the open-source GNU
12+
General Public License (GPLv3) or under the terms of one of the closed-
13+
source Quantum Leaps commercial licenses.
14+
15+
Redistributions in source code must retain this top-level comment block.
16+
Plagiarizing this software to sidestep the license obligations is illegal.
17+
18+
NOTE:
19+
The GPL does NOT permit the incorporation of this code into proprietary
20+
programs. Please contact Quantum Leaps for commercial licensing options,
21+
which expressly supersede the GPL and are designed explicitly for
22+
closed-source distribution.
23+
24+
Quantum Leaps contact information:
25+
<www.state-machine.com/licensing>
26+

include/qmpool.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class QMPool {
102102
}
103103

104104
private:
105-
QMPool(QEQueue const & other) = delete;
105+
QMPool(QMPool const & other) = delete;
106106
QMPool & operator=(QMPool const & other) = delete;
107107

108108
// friends...

include/qp.hpp

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
#define QP_HPP_
3131

3232
//============================================================================
33-
#define QP_VERSION_STR "8.0.4"
34-
#define QP_VERSION 804U
35-
// <VER>=804 <DATE>=250611
36-
#define QP_RELEASE 0x6A9FC8ABU
33+
#define QP_VERSION_STR "8.0.5"
34+
#define QP_VERSION 805U
35+
// <VER>=805 <DATE>=250811
36+
#define QP_RELEASE 0x6A81442A
3737

3838
//============================================================================
3939
// default configuration settings
@@ -178,28 +178,25 @@ class QAsm {
178178
QAsmAttr m_state;
179179
QAsmAttr m_temp;
180180

181-
// All possible return values from state-handlers
181+
// All possible values returned from state/action handlers...
182182
// NOTE: The ordering is important for algorithmic correctness.
183+
184+
// unhandled and needs to "bubble up"
183185
static constexpr QState Q_RET_SUPER {0U};
184186
static constexpr QState Q_RET_UNHANDLED {1U};
185187

186-
// handled and do not need to "bubble up"
188+
// handled and does not need to "bubble up"
187189
static constexpr QState Q_RET_HANDLED {2U};
188190
static constexpr QState Q_RET_IGNORED {3U};
189191

190-
// entry/exit
192+
// entry/exit/initial
191193
static constexpr QState Q_RET_ENTRY {4U};
192194
static constexpr QState Q_RET_EXIT {5U};
195+
static constexpr QState Q_RET_TRAN_INIT {6U};
193196

194-
// no side effects
195-
static constexpr QState Q_RET_NULL {6U};
196-
197-
// transitions need to execute transition-action table in QP::QMsm
197+
// regular tran./tran.-to-history
198198
static constexpr QState Q_RET_TRAN {7U};
199-
static constexpr QState Q_RET_TRAN_INIT {8U};
200-
201-
// transitions that additionally clobber QHsm.m_state
202-
static constexpr QState Q_RET_TRAN_HIST {9U};
199+
static constexpr QState Q_RET_TRAN_HIST {8U};
203200

204201
// Reserved signals by the QP-framework
205202
static constexpr QSignal Q_EMPTY_SIG {0U};
@@ -451,6 +448,9 @@ namespace QP {
451448

452449
using QPrioSpec = std::uint16_t;
453450

451+
class QEQueue; // forward declaration
452+
class QActive; // forward declaration
453+
454454
#if (QF_TIMEEVT_CTR_SIZE == 1U)
455455
using QTimeEvtCtr = std::uint8_t;
456456
#elif (QF_TIMEEVT_CTR_SIZE == 2U)
@@ -556,9 +556,6 @@ class QSubscrList {
556556

557557
//============================================================================
558558

559-
class QEQueue; // forward declaration
560-
class QActive; // forward declaration
561-
562559
//----------------------------------------------------------------------------
563560
// declarations for friendship with the QActive class
564561

include/qp_pkg.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Attr {
4747

4848
#if (QF_MAX_EPOOL > 0U)
4949
QF_EPOOL_TYPE_ ePool_[QF_MAX_EPOOL];
50-
std::uint_fast8_t maxPool_;
50+
std::uint8_t maxPool_;
5151
#else
5252
std::uint8_t dummy;
5353
#endif // (QF_MAX_EPOOL == 0U)

ports/freertos/qf_port.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void task_function(void *pvParameters) { // FreeRTOS task signature
7575
// xQUEUE.uxLength == StaticQueue_t.uxDummy4[1];
7676
//
7777
#define FREERTOS_QUEUE_GET_FREE() \
78-
(m_osObject.uxDummy4[1] - m_osObject.uxDummy4[0])
78+
(m_osObject.m_queue.uxDummy4[1] - m_osObject.m_queue.uxDummy4[0])
7979

8080
// namespace QP ==============================================================
8181
namespace QP {
@@ -156,9 +156,9 @@ void QActive::start(
156156
static_cast<UBaseType_t>(qLen), // length of the queue
157157
static_cast<UBaseType_t>(sizeof(QEvt *)), // element size
158158
reinterpret_cast<std::uint8_t *>(qSto), // queue buffer
159-
&m_osObject); // static queue buffer
159+
&m_osObject.m_queue); // static queue buffer
160160
QF_CRIT_ENTRY();
161-
Q_ASSERT_INCRIT(110, m_eQueue != static_cast<QueueHandle_t>(0));
161+
Q_ASSERT_INCRIT(110, m_eQueue != nullptr);
162162
QF_CRIT_EXIT();
163163

164164
m_prio = static_cast<std::uint8_t>(prioSpec & 0xFFU); // QF-priority
@@ -170,9 +170,9 @@ void QActive::start(
170170
QS_FLUSH(); // flush the trace buffer to the host
171171

172172
// task name provided by the user in QActive::setAttr() or default name
173-
char const *taskName = (m_thread.pxDummy1 != nullptr)
174-
? static_cast<char const *>(m_thread.pxDummy1)
175-
: static_cast<char const *>("AO");
173+
char const *taskName = (m_osObject.m_task.pxDummy1 != nullptr)
174+
? static_cast<char const *>(m_osObject.m_task.pxDummy1)
175+
: static_cast<char const *>("AO");
176176

177177
// The FreeRTOS priority of the AO thread can be specified in two ways:
178178
//
@@ -199,17 +199,17 @@ void QActive::start(
199199
}
200200

201201
// statically create the FreeRTOS task for the AO
202-
TaskHandle_t task = xTaskCreateStatic(
202+
m_thread = xTaskCreateStatic(
203203
&task_function, // the task function
204204
taskName , // the name of the task
205205
stkSize/sizeof(portSTACK_TYPE), // stack length
206206
this, // the 'pvParameters' parameter
207207
freertos_prio, // FreeRTOS priority
208208
static_cast<StackType_t *>(stkSto), // stack storage
209-
&m_thread); // task buffer
209+
&m_osObject.m_task); // task buffer
210210

211211
QF_CRIT_ENTRY();
212-
Q_ASSERT_INCRIT(120, task != static_cast<TaskHandle_t>(0));
212+
Q_ASSERT_INCRIT(120, m_thread != nullptr);
213213
QF_CRIT_EXIT();
214214

215215
#ifdef Q_UNSAFE
@@ -231,11 +231,11 @@ void QActive::setAttr(std::uint32_t attr1, void const *attr2) {
231231
QF_CRIT_ENTRY();
232232
// this function must be called before QACTIVE_START(),
233233
// which implies that m_thread.pxDummy1 must not be used yet;
234-
Q_REQUIRE_INCRIT(150, m_thread.pxDummy1 == nullptr);
234+
Q_REQUIRE_INCRIT(150, m_osObject.m_task.pxDummy1 == nullptr);
235235
switch (attr1) {
236236
case TASK_NAME_ATTR:
237237
// temporarily store the name, cast 'const' away
238-
m_thread.pxDummy1 = const_cast<void *>(attr2);
238+
m_osObject.m_task.pxDummy1 = const_cast<void *>(attr2);
239239
break;
240240
// ...
241241
default:

ports/freertos/qp_port.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838

3939
// QActive customization for FreeRTOS
4040
#define QACTIVE_EQUEUE_TYPE QueueHandle_t
41-
#define QACTIVE_OS_OBJ_TYPE StaticQueue_t
42-
#define QACTIVE_THREAD_TYPE StaticTask_t
41+
#define QACTIVE_OS_OBJ_TYPE OsObject
42+
#define QACTIVE_THREAD_TYPE TaskHandle_t
4343

4444
// FreeRTOS requires the "FromISR" API in QP/C++
4545
#define QF_ISR_API 1
@@ -59,11 +59,15 @@
5959
#include "task.h" // FreeRTOS task management
6060
#include "queue.h" // FreeRTOS queue management
6161

62+
struct OsObject {
63+
StaticQueue_t m_queue;
64+
StaticTask_t m_task;
65+
};
66+
6267
#include "qequeue.hpp" // QP event queue (for deferring events)
6368
#include "qmpool.hpp" // QP memory pool (for event pools)
6469
#include "qp.hpp" // QP platform-independent public interface
6570

66-
6771
// the "FromISR" versions of the QF APIs, see NOTE3
6872
#ifdef Q_SPY
6973
#define PUBLISH_FROM_ISR(e_, pxHigherPrioTaskWoken_, sender_) \

qpcpp_8.0.4.sha1 renamed to qpcpp_8.0.5.sha1

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
c13a351b39b423e6f1973787f7dd286e478a5bb8 *include/qequeue.hpp
22
793692a6b18382bf007f214ef06dde27c6643b04 *include/qk.hpp
3-
4e14e378ebb4876cc472dfe7ef870de4787ec06c *include/qmpool.hpp
4-
a399defd0b9aaf1ca48ae06fb040ded4b25f2a42 *include/qp.hpp
5-
b7df71d79755d9ce7a8335e3fd14df481794f609 *include/qp_pkg.hpp
3+
d64630895002a281257f751b6c11797c6514ea9f *include/qmpool.hpp
4+
11a47dc94b01494bde3ef6a12defaee62ba0799c *include/qp.hpp
5+
d32dc8468cb6bf0692aa1eb4d11560bcffac9f2e *include/qp_pkg.hpp
66
e37b577c4c0d127557801ed1f5b09ea61d9f6c8e *include/qpcpp.hpp
7-
d3183de500ed079ed8bcbebd31c9a38eba307feb *include/qs.hpp
7+
28d88acb39123604b6afca0b9c7323794cd9f1d5 *include/qs.hpp
88
4f3d2c3aa8bced38a571cb0dc1e3ac4fc05940f7 *include/qs_dummy.hpp
9-
d30a5d7d12a00bb3329a401d66d62a59a28245a7 *include/qs_pkg.hpp
9+
2e7dc2fd0bdf7bcfdea8e80a2bdddf95ba7e4001 *include/qs_pkg.hpp
1010
fa866cf8f14f6c481e9f64a1cf48bcdcf7e81240 *include/qsafe.h
1111
3a24b92e458b3addc73af63ee66a6e51bd9ed8cc *include/qstamp.hpp
1212
20ef270dfc178e25927fc48d0230889824ee0d54 *include/qv.hpp
1313
d3d3e201835398744069a7b86a8a0624188e555c *include/qxk.hpp
1414
0199f3eeb6c02b8cc890ee4c6f6d344569a0858f *include/README.md
1515
71899ce74eeb04f333ed00d53f87719f722a39ab *src/qf/CMakeLists.txt
16-
e70d0cd8d54047fd854c4bf55da6a5ff2d571d4a *src/qf/qep_hsm.cpp
17-
a70891b7b65fef362c318bd2e0ffc396d4b63f23 *src/qf/qep_msm.cpp
16+
b85ff0dee3842c6db3f81899ce370f7248e2bee8 *src/qf/qep_hsm.cpp
17+
cd5e4cf38c54c117f639644f59fbfe9cba64d51b *src/qf/qep_msm.cpp
1818
03dd5b24ff8517608c2dfb7f85a22e71f8bb50ab *src/qf/qf_act.cpp
1919
bd21539d1962e9a00db653f10e8c241abee97119 *src/qf/qf_actq.cpp
2020
084e050639c4ccf28f5b93f57082ae00294f3a92 *src/qf/qf_defer.cpp
21-
94841287f4d771be7c891604a594208e4415a6c3 *src/qf/qf_dyn.cpp
22-
94a7a263b32f704f593a4782cbff2e422b2898c7 *src/qf/qf_mem.cpp
21+
9b2530890aa8a6ed68977c317de86e400af661d7 *src/qf/qf_dyn.cpp
22+
5e30caa815031dfc8c648faefb0faff720e21cae *src/qf/qf_mem.cpp
2323
0ec1869e8115d0b20e9b49b531f62adefde74d63 *src/qf/qf_ps.cpp
2424
f01358c88e2a45f04a1c8852d0efec19fce4fcc8 *src/qf/qf_qact.cpp
2525
4028fdfef72fca72fa232c77817b9e2b65f2ec39 *src/qf/qf_qeq.cpp
@@ -28,7 +28,7 @@ a727a1456a845d5e43b3c8684765b60197ace59c *src/qf/qf_time.cpp
2828
7cdab433e81612862fd27f0cf792d38e1197d064 *src/qk/CMakeLists.txt
2929
fca9b5540b12355da849669d0207d1d3cfbf710c *src/qk/qk.cpp
3030
eb28260d471fc752ca54b2c1e2d763f28432c2c1 *src/qs/CMakeLists.txt
31-
b63174df2803f946a244efa51579d06956ab72d5 *src/qs/qs.cpp
31+
027b77113fb8e43f23e2ffcbae22893a1c3d47a2 *src/qs/qs.cpp
3232
c4b431ecbed6961c4fc03777319bdb61008b2e9a *src/qs/qs_64bit.cpp
3333
256b098b03089aa724dcba23d33565fb7849c362 *src/qs/qs_fp.cpp
3434
d21cc2a0292a682a1ce1bfa0d5b3af7fbb2632a0 *src/qs/qs_rx.cpp
@@ -99,8 +99,8 @@ d20e40d3c828d1d9681c314528ca5e2f18cd772d *ports/embos/qp_port.hpp
9999
35fbee9e7492cf897f26b6686b3b650c6b8fabb8 *ports/embos/qs_port.hpp
100100
4e86718c62fd78bc866ffdf855aa1e5a186916b2 *ports/embos/syscalls.c
101101
e4f00894f86806af6d88d38e831a8fc0ad36059e *ports/freertos/CMakeLists.txt
102-
da5abb9a583d785cfe70ff4861e7469d3d8e8591 *ports/freertos/qf_port.cpp
103-
6498bc99657223bcc9e69a2bdd28863555609402 *ports/freertos/qp_port.hpp
102+
a16a6f1e499bc7fb91cdcdd73c7058eaa32e7d53 *ports/freertos/qf_port.cpp
103+
9f4ca9fff8327bc18348358a71d57c913649f740 *ports/freertos/qp_port.hpp
104104
35fbee9e7492cf897f26b6686b3b650c6b8fabb8 *ports/freertos/qs_port.hpp
105105
4e86718c62fd78bc866ffdf855aa1e5a186916b2 *ports/freertos/syscalls.c
106106
18df978f665338c757f1a2a284c2acc779bd59d3 *ports/threadx/CMakeLists.txt
@@ -162,8 +162,9 @@ f084c5b1e8f6a58679f3235a1c6f9eb0fcc02e97 *ports/win32-qutest/safe_std.h
162162
76dd9078dc4311d53d3862d44177a8660258da6d *zephyr/CMakeLists.txt
163163
36a0252cf0bfd6be0d345c48c00b2300f8917f05 *zephyr/Kconfig
164164
2eb2a922e18b4760a68151ebee1b6282d20b4692 *zephyr/module.yml
165-
3427e1e065cd1bbc7ce9c46749a8ecdefbf8143c *zephyr/qf_port.cpp
165+
9a9e5f0a8e48600f64ae98016b709da12beadeb2 *zephyr/qf_port.cpp
166166
109c291df50110f185adc17bcdf8becc0a79346c *zephyr/qp-zephyr.jpg
167167
12fda4da868f4b3d6be1120a220d0bf72fe51a65 *zephyr/qp_port.hpp
168168
0ddae999ce63eb39de7758fa7574d06188a89fbe *zephyr/qs_port.hpp
169+
680911bb9e5cd87a9954407d3c18fce7dbca4df8 *zephyr/qutest_port.cpp
169170
791248d57ce8dfa6497728c7c2d0734c2c581625 *zephyr/README.md

sha1.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@setlocal
22

3-
set VERSION=8.0.4
3+
set VERSION=8.0.5
44

55
:: usage
66
@echo Usage: qppcp_sha1 [gen]

0 commit comments

Comments
 (0)