Skip to content

Commit d3f94c7

Browse files
committed
7.4.0-rc.3
1 parent c284a04 commit d3f94c7

File tree

23 files changed

+188
-236
lines changed

23 files changed

+188
-236
lines changed

examples

Submodule examples updated 160 files

include/qp.h

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ enum QStateRet {
199199
// unhandled and need to "bubble up"
200200
Q_RET_SUPER, //!< event passed to superstate to handle
201201
Q_RET_SUPER_SUB, //!< event passed to submachine superstate
202-
Q_RET_UNHANDLED, //!< event unhandled due to a guard
202+
Q_RET_UNHANDLED, //!< event unhandled due to guard
203203

204204
// handled and do not need to "bubble up"
205205
Q_RET_HANDLED, //!< event handled (internal transition)
@@ -417,13 +417,8 @@ bool QMsm_isIn_(
417417
QAsm * const me,
418418
QStateHandler const state);
419419

420-
//! @private @memberof QMsm
421-
//! @deprecated instead use: QASM_IS_IN()
422-
bool QMsm_isInState(QMsm const * const me,
423-
QMState const * const stateObj);
424-
425420
//! @public @memberof QMsm
426-
static inline QMState const * QMsm_stateObj(QMsm * const me) {
421+
static inline QMState const * QMsm_stateObj(QMsm const * const me) {
427422
return me->super.state.obj;
428423
}
429424

@@ -861,10 +856,8 @@ void QActive_setAttr(QActive * const me,
861856
uint32_t attr1,
862857
void const * attr2);
863858

864-
// private:
865-
866-
//! @private @memberof QActive
867-
void QActive_start_(QActive * const me,
859+
//! @public @memberof QActive
860+
void QActive_start(QActive * const me,
868861
QPrioSpec const prioSpec,
869862
QEvt const * * const qSto,
870863
uint_fast16_t const qLen,
@@ -1197,11 +1190,6 @@ void QF_gcFromISR(QEvt const * const e);
11971190
(evtRef_) = (void *)0; \
11981191
} while (false)
11991192

1200-
//${QF-macros::QACTIVE_START} ................................................
1201-
#define QACTIVE_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \
1202-
(QActive_start_((QActive *)(me_), (prioSpec_), \
1203-
(qSto_), (qLen_), (stkSto_), (stkSize_), (par_)))
1204-
12051193
//${QF-macros::QACTIVE_POST} .................................................
12061194
#ifdef Q_SPY
12071195
#define QACTIVE_POST(me_, e_, sender_) \

include/qpc.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,19 @@
7272
//! @deprecated plain 'char' is no longer forbidden in MISRA-C:2023
7373
typedef char char_t;
7474

75-
//! @deprecated assertion failure handler
75+
//! @deprecated Macro for starting an Active Object.
76+
//! Use QActive::QActive_start() instead.
77+
#define QACTIVE_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \
78+
(QActive_start((QActive *)(me_), (prioSpec_), \
79+
(qSto_), (qLen_), (stkSto_), (stkSize_), (par_)))
80+
81+
//! @deprecated Macro for starting an eXtended Thread.
82+
//! Use QXThread::QXThread_start() instead.
83+
#define QXTHREAD_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \
84+
(QXThread_start((QXThread *)(me_), (prioSpec_), \
85+
(qSto_), (qLen_), (stkSto_), (stkSize_), (par_)))
86+
87+
//! @deprecated Assertion failure handler.
7688
//! Use Q_onError() instead.
7789
#define Q_onAssert(module_, id_) Q_onError(module_, id_)
7890

@@ -130,7 +142,7 @@ static inline void QF_psInit(
130142
#define QHSM_DISPATCH(me_, e_, qsId_) QASM_DISPATCH((me_), (e_), (qsId_))
131143

132144
//! @deprecated instead use: QASM_IS_IN()
133-
#define QHsm_isIn(me_, state_) QHsm_isIn_((QAsm *)(me_), (state_))
145+
#define QHsm_isIn(me_, state_) QASM_IS_IN((QAsm *)(me_), (state_))
134146

135147
//============================================================================
136148
#if (QP_API_VERSION < 691)

include/qxk.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,18 @@ void QXThread_ctor(QXThread * const me,
163163
QXThreadHandler const handler,
164164
uint_fast8_t const tickRate);
165165

166+
//! @public @memberof QXThread
167+
static inline void QXThread_start(QXThread * const me,
168+
QPrioSpec const prioSpec,
169+
QEvt const * * const qSto,
170+
uint_fast16_t const qLen,
171+
void * const stkSto,
172+
uint_fast16_t const stkSize,
173+
void const * const par)
174+
{
175+
QActive_start(&me->super, prioSpec, qSto, qLen, stkSto, stkSize, par);
176+
}
177+
166178
//! @public @memberof QXThread
167179
bool QXThread_delay(QTimeEvtCtr const nTicks);
168180

@@ -269,10 +281,6 @@ void QXMutex_unlock(QXMutex * const me);
269281

270282
//$declare${QXK-macros} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
271283

272-
//${QXK-macros::QXTHREAD_START} ..............................................
273-
#define QXTHREAD_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) QACTIVE_START((me_), (prioSpec_), (qSto_), (qLen_), \
274-
(stkSto_), (stkSize_), (par_))
275-
276284
//${QXK-macros::QXTHREAD_POST_X} .............................................
277285
#define QXTHREAD_POST_X(me_, e_, margin_, sender_) \
278286
QACTIVE_POST_X(&(me_)->super, (e_), (margin_), (sender_))

ports/embos/qf_port.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,11 @@ void QF_stop(void) {
101101
}
102102

103103
//............................................................................
104-
void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
105-
QEvt const * * const qSto, uint_fast16_t const qLen,
106-
void * const stkSto, uint_fast16_t const stkSize,
107-
void const * const par)
104+
void QActive_start(QActive * const me,
105+
QPrioSpec const prioSpec,
106+
QEvt const * * const qSto, uint_fast16_t const qLen,
107+
void * const stkSto, uint_fast16_t const stkSize,
108+
void const * const par)
108109
{
109110
// create the embOS message box for the AO
110111
OS_MAILBOX_Create(&me->eQueue,
@@ -297,7 +298,7 @@ QEvt const *QActive_get_(QActive * const me) {
297298
// FPU. In this QP-embOS port, an active object task that uses the FPU is
298299
// designated by the QF_TASK_USES_FPU attribute, which can be set with the
299300
// QF_setEmbOsTaskAttr() function. The task attributes must be set *before*
300-
// calling QACTIVE_START(). The task attributes are saved in QActive.osObject
301+
// calling QActive_start(). The task attributes are saved in QActive.osObject
301302
// member.
302303
//
303304
// NOTE3:

ports/freertos/qf_port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static void task_function(void *pvParameters) { // FreeRTOS task signature
122122
}
123123

124124
//............................................................................
125-
void QActive_start_(QActive * const me,
125+
void QActive_start(QActive * const me,
126126
QPrioSpec const prioSpec,
127127
QEvt const * * const qSto,
128128
uint_fast16_t const qLen,
@@ -214,7 +214,7 @@ void QActive_stop(QActive * const me) {
214214
void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) {
215215
QF_CRIT_STAT
216216
QF_CRIT_ENTRY();
217-
// this function must be called before QACTIVE_START(),
217+
// this function must be called before QActive_start(),
218218
// which implies that me->thread.pxDummy1 must not be used yet;
219219
Q_REQUIRE_INCRIT(300, me->thread.pxDummy1 == (void *)0);
220220
switch (attr1) {

ports/posix-qv/qf_port.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,11 @@ int QF_consoleWaitForKey(void) {
367367
#endif
368368

369369
// QActive functions =========================================================
370-
void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
371-
QEvt const * * const qSto, uint_fast16_t const qLen,
372-
void * const stkSto, uint_fast16_t const stkSize,
373-
void const * const par)
370+
void QActive_start(QActive * const me,
371+
QPrioSpec const prioSpec,
372+
QEvt const * * const qSto, uint_fast16_t const qLen,
373+
void * const stkSto, uint_fast16_t const stkSize,
374+
void const * const par)
374375
{
375376
Q_UNUSED_PAR(stkSto);
376377
Q_UNUSED_PAR(stkSize);

ports/posix/qf_port.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,11 @@ static void *thread_routine(void *arg) { // the expected POSIX signature
311311
}
312312

313313
// QActive functions =======================================================
314-
void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
315-
QEvt const * * const qSto, uint_fast16_t const qLen,
316-
void * const stkSto, uint_fast16_t const stkSize,
317-
void const * const par)
314+
void QActive_start(QActive * const me,
315+
QPrioSpec const prioSpec,
316+
QEvt const * * const qSto, uint_fast16_t const qLen,
317+
void * const stkSto, uint_fast16_t const stkSize,
318+
void const * const par)
318319
{
319320
Q_UNUSED_PAR(stkSto);
320321
Q_UNUSED_PAR(stkSize);

ports/qube/qube.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ int_t QF_run(void) {
357357
}
358358

359359
//--------------------------------------------------------------------------
360-
void QActive_start_(QActive* const me,
360+
void QActive_start(QActive* const me,
361361
QPrioSpec const prioSpec,
362362
QEvt const** const qSto,
363363
uint_fast16_t const qLen,

ports/threadx/qf_port.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,11 @@ static void thread_function(ULONG thread_input) { // ThreadX signature
7373
}
7474
}
7575
//............................................................................
76-
void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
77-
QEvt const * * const qSto, uint_fast16_t const qLen,
78-
void * const stkSto, uint_fast16_t const stkSize,
79-
void const * const par)
76+
void QActive_start(QActive * const me,
77+
QPrioSpec const prioSpec,
78+
QEvt const * * const qSto, uint_fast16_t const qLen,
79+
void * const stkSto, uint_fast16_t const stkSize,
80+
void const * const par)
8081
{
8182
me->prio = (uint8_t)(prioSpec & 0xFFU); // QF-priority
8283
me->pthre = (uint8_t)(prioSpec >> 8U); // QF preemption-threshold
@@ -116,7 +117,7 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
116117
}
117118
//............................................................................
118119
void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) {
119-
// this function must be called before QACTIVE_START(),
120+
// this function must be called before QActive_start(),
120121
// which implies that me->thread.tx_thread_name must not be used yet;
121122
//
122123
QF_CRIT_STAT

0 commit comments

Comments
 (0)