From 25946b89e3a594437e4fb2e437ec9c20f51a2c1e Mon Sep 17 00:00:00 2001 From: MMS Date: Wed, 28 Aug 2024 03:03:05 -0400 Subject: [PATCH] 7.4.0-rc.3 --- examples | 2 +- include/qp.h | 20 +--- include/qpc.h | 16 ++- include/qxk.h | 16 ++- ports/embos/qf_port.c | 11 +- ports/freertos/qf_port.c | 4 +- ports/posix-qv/qf_port.c | 9 +- ports/posix/qf_port.c | 9 +- ports/qube/qube.c | 2 +- ports/threadx/qf_port.c | 11 +- ports/uc-os2/qf_port.c | 13 ++- ports/win32-qv/qf_port.c | 9 +- ports/win32/qf_port.c | 9 +- qpc.qm | 193 +++++++++++++------------------ src/qf/qep_msm.c | 29 +---- src/qk/qk.c | 4 +- src/qs/qutest.c | 4 +- src/qv/qv.c | 4 +- src/qxk/qxk.c | 4 +- test/qk/test_sched/test_sched.c | 2 +- test/qxk/test_sched/test_sched.c | 4 +- zephyr/qf_port.c | 13 ++- 22 files changed, 170 insertions(+), 218 deletions(-) diff --git a/examples b/examples index c2de40184..16ea07cc4 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit c2de401845b27784d4d9f5a9d6185f7b8d99add0 +Subproject commit 16ea07cc4dbcbde83431a9962cf4ec157b951dcf diff --git a/include/qp.h b/include/qp.h index aea06c9de..b0b5f3717 100644 --- a/include/qp.h +++ b/include/qp.h @@ -199,7 +199,7 @@ enum QStateRet { // unhandled and need to "bubble up" Q_RET_SUPER, //!< event passed to superstate to handle Q_RET_SUPER_SUB, //!< event passed to submachine superstate - Q_RET_UNHANDLED, //!< event unhandled due to a guard + Q_RET_UNHANDLED, //!< event unhandled due to guard // handled and do not need to "bubble up" Q_RET_HANDLED, //!< event handled (internal transition) @@ -417,13 +417,8 @@ bool QMsm_isIn_( QAsm * const me, QStateHandler const state); -//! @private @memberof QMsm -//! @deprecated instead use: QASM_IS_IN() -bool QMsm_isInState(QMsm const * const me, - QMState const * const stateObj); - //! @public @memberof QMsm -static inline QMState const * QMsm_stateObj(QMsm * const me) { +static inline QMState const * QMsm_stateObj(QMsm const * const me) { return me->super.state.obj; } @@ -861,10 +856,8 @@ void QActive_setAttr(QActive * const me, uint32_t attr1, void const * attr2); -// private: - -//! @private @memberof QActive -void QActive_start_(QActive * const me, +//! @public @memberof QActive +void QActive_start(QActive * const me, QPrioSpec const prioSpec, QEvt const * * const qSto, uint_fast16_t const qLen, @@ -1197,11 +1190,6 @@ void QF_gcFromISR(QEvt const * const e); (evtRef_) = (void *)0; \ } while (false) -//${QF-macros::QACTIVE_START} ................................................ -#define QACTIVE_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \ - (QActive_start_((QActive *)(me_), (prioSpec_), \ - (qSto_), (qLen_), (stkSto_), (stkSize_), (par_))) - //${QF-macros::QACTIVE_POST} ................................................. #ifdef Q_SPY #define QACTIVE_POST(me_, e_, sender_) \ diff --git a/include/qpc.h b/include/qpc.h index ac0660c66..c02c08a42 100644 --- a/include/qpc.h +++ b/include/qpc.h @@ -72,7 +72,19 @@ //! @deprecated plain 'char' is no longer forbidden in MISRA-C:2023 typedef char char_t; -//! @deprecated assertion failure handler +//! @deprecated Macro for starting an Active Object. +//! Use QActive::QActive_start() instead. +#define QACTIVE_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \ + (QActive_start((QActive *)(me_), (prioSpec_), \ + (qSto_), (qLen_), (stkSto_), (stkSize_), (par_))) + +//! @deprecated Macro for starting an eXtended Thread. +//! Use QXThread::QXThread_start() instead. +#define QXTHREAD_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \ + (QXThread_start((QXThread *)(me_), (prioSpec_), \ + (qSto_), (qLen_), (stkSto_), (stkSize_), (par_))) + +//! @deprecated Assertion failure handler. //! Use Q_onError() instead. #define Q_onAssert(module_, id_) Q_onError(module_, id_) @@ -130,7 +142,7 @@ static inline void QF_psInit( #define QHSM_DISPATCH(me_, e_, qsId_) QASM_DISPATCH((me_), (e_), (qsId_)) //! @deprecated instead use: QASM_IS_IN() -#define QHsm_isIn(me_, state_) QHsm_isIn_((QAsm *)(me_), (state_)) +#define QHsm_isIn(me_, state_) QASM_IS_IN((QAsm *)(me_), (state_)) //============================================================================ #if (QP_API_VERSION < 691) diff --git a/include/qxk.h b/include/qxk.h index 883340933..ba8287e7e 100644 --- a/include/qxk.h +++ b/include/qxk.h @@ -163,6 +163,18 @@ void QXThread_ctor(QXThread * const me, QXThreadHandler const handler, uint_fast8_t const tickRate); +//! @public @memberof QXThread +static inline void QXThread_start(QXThread * const me, + QPrioSpec const prioSpec, + QEvt const * * const qSto, + uint_fast16_t const qLen, + void * const stkSto, + uint_fast16_t const stkSize, + void const * const par) +{ + QActive_start(&me->super, prioSpec, qSto, qLen, stkSto, stkSize, par); +} + //! @public @memberof QXThread bool QXThread_delay(QTimeEvtCtr const nTicks); @@ -269,10 +281,6 @@ void QXMutex_unlock(QXMutex * const me); //$declare${QXK-macros} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -//${QXK-macros::QXTHREAD_START} .............................................. -#define QXTHREAD_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) QACTIVE_START((me_), (prioSpec_), (qSto_), (qLen_), \ - (stkSto_), (stkSize_), (par_)) - //${QXK-macros::QXTHREAD_POST_X} ............................................. #define QXTHREAD_POST_X(me_, e_, margin_, sender_) \ QACTIVE_POST_X(&(me_)->super, (e_), (margin_), (sender_)) diff --git a/ports/embos/qf_port.c b/ports/embos/qf_port.c index 9595e6782..604e0d324 100644 --- a/ports/embos/qf_port.c +++ b/ports/embos/qf_port.c @@ -101,10 +101,11 @@ void QF_stop(void) { } //............................................................................ -void QActive_start_(QActive * const me, QPrioSpec const prioSpec, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +void QActive_start(QActive * const me, + QPrioSpec const prioSpec, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par) { // create the embOS message box for the AO OS_MAILBOX_Create(&me->eQueue, @@ -297,7 +298,7 @@ QEvt const *QActive_get_(QActive * const me) { // FPU. In this QP-embOS port, an active object task that uses the FPU is // designated by the QF_TASK_USES_FPU attribute, which can be set with the // QF_setEmbOsTaskAttr() function. The task attributes must be set *before* -// calling QACTIVE_START(). The task attributes are saved in QActive.osObject +// calling QActive_start(). The task attributes are saved in QActive.osObject // member. // // NOTE3: diff --git a/ports/freertos/qf_port.c b/ports/freertos/qf_port.c index 3c7285b25..22a378fc3 100644 --- a/ports/freertos/qf_port.c +++ b/ports/freertos/qf_port.c @@ -122,7 +122,7 @@ static void task_function(void *pvParameters) { // FreeRTOS task signature } //............................................................................ -void QActive_start_(QActive * const me, +void QActive_start(QActive * const me, QPrioSpec const prioSpec, QEvt const * * const qSto, uint_fast16_t const qLen, @@ -214,7 +214,7 @@ void QActive_stop(QActive * const me) { void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) { QF_CRIT_STAT QF_CRIT_ENTRY(); - // this function must be called before QACTIVE_START(), + // this function must be called before QActive_start(), // which implies that me->thread.pxDummy1 must not be used yet; Q_REQUIRE_INCRIT(300, me->thread.pxDummy1 == (void *)0); switch (attr1) { diff --git a/ports/posix-qv/qf_port.c b/ports/posix-qv/qf_port.c index eb9fcc370..26e731e2e 100644 --- a/ports/posix-qv/qf_port.c +++ b/ports/posix-qv/qf_port.c @@ -367,10 +367,11 @@ int QF_consoleWaitForKey(void) { #endif // QActive functions ========================================================= -void QActive_start_(QActive * const me, QPrioSpec const prioSpec, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +void QActive_start(QActive * const me, + QPrioSpec const prioSpec, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par) { Q_UNUSED_PAR(stkSto); Q_UNUSED_PAR(stkSize); diff --git a/ports/posix/qf_port.c b/ports/posix/qf_port.c index 76c32805c..a771a4ca2 100644 --- a/ports/posix/qf_port.c +++ b/ports/posix/qf_port.c @@ -311,10 +311,11 @@ static void *thread_routine(void *arg) { // the expected POSIX signature } // QActive functions ======================================================= -void QActive_start_(QActive * const me, QPrioSpec const prioSpec, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +void QActive_start(QActive * const me, + QPrioSpec const prioSpec, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par) { Q_UNUSED_PAR(stkSto); Q_UNUSED_PAR(stkSize); diff --git a/ports/qube/qube.c b/ports/qube/qube.c index c1dd5785e..c40c44260 100644 --- a/ports/qube/qube.c +++ b/ports/qube/qube.c @@ -357,7 +357,7 @@ int_t QF_run(void) { } //-------------------------------------------------------------------------- -void QActive_start_(QActive* const me, +void QActive_start(QActive* const me, QPrioSpec const prioSpec, QEvt const** const qSto, uint_fast16_t const qLen, diff --git a/ports/threadx/qf_port.c b/ports/threadx/qf_port.c index b94297c98..85568022b 100644 --- a/ports/threadx/qf_port.c +++ b/ports/threadx/qf_port.c @@ -73,10 +73,11 @@ static void thread_function(ULONG thread_input) { // ThreadX signature } } //............................................................................ -void QActive_start_(QActive * const me, QPrioSpec const prioSpec, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +void QActive_start(QActive * const me, + QPrioSpec const prioSpec, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par) { me->prio = (uint8_t)(prioSpec & 0xFFU); // QF-priority me->pthre = (uint8_t)(prioSpec >> 8U); // QF preemption-threshold @@ -116,7 +117,7 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec, } //............................................................................ void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) { - // this function must be called before QACTIVE_START(), + // this function must be called before QActive_start(), // which implies that me->thread.tx_thread_name must not be used yet; // QF_CRIT_STAT diff --git a/ports/uc-os2/qf_port.c b/ports/uc-os2/qf_port.c index 6084da7b0..5d2422e10 100644 --- a/ports/uc-os2/qf_port.c +++ b/ports/uc-os2/qf_port.c @@ -83,10 +83,11 @@ static void task_function(void *pdata) { // uC-OS2 task signature } //............................................................................ -void QActive_start_(QActive * const me, QPrioSpec const prioSpec, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +void QActive_start(QActive * const me, + QPrioSpec const prioSpec, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par) { // task name to be passed to OSTaskCreateExt() void * const task_name = (void *)me->eQueue; @@ -168,7 +169,7 @@ void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) { QF_CRIT_ENTRY(); switch (attr1) { case TASK_NAME_ATTR: - // this function must be called before QACTIVE_START(), + // this function must be called before QActive_start(), // which implies that me->eQueue must not be used yet; Q_ASSERT_INCRIT(300, me->eQueue == (OS_EVENT *)0); // temporarily store the name, cast 'const' away @@ -311,7 +312,7 @@ QEvt const *QActive_get_(QActive * const me) { // NOTE1: // The member QActive.thread is set to the uC-OS2 task options in the // function QF_setUCosTaskAttr(), which must be called **before** -// QACTIVE_START(). +// QActive_start(). // // NOTE3: // The event posting to uC-OS2 message queue occurs OUTSIDE critical section, diff --git a/ports/win32-qv/qf_port.c b/ports/win32-qv/qf_port.c index ab5be3b11..434b70620 100644 --- a/ports/win32-qv/qf_port.c +++ b/ports/win32-qv/qf_port.c @@ -235,10 +235,11 @@ int QF_consoleWaitForKey(void) { // QActive functions ========================================================= -void QActive_start_(QActive * const me, QPrioSpec const prioSpec, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +void QActive_start(QActive * const me, + QPrioSpec const prioSpec, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par) { Q_UNUSED_PAR(stkSto); Q_UNUSED_PAR(stkSize); diff --git a/ports/win32/qf_port.c b/ports/win32/qf_port.c index 06406325c..09507a8a5 100644 --- a/ports/win32/qf_port.c +++ b/ports/win32/qf_port.c @@ -165,10 +165,11 @@ int QF_consoleWaitForKey(void) { // QActive functions ========================================================= -void QActive_start_(QActive * const me, QPrioSpec const prioSpec, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +void QActive_start(QActive * const me, + QPrioSpec const prioSpec, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par) { Q_UNUSED_PAR(stkSto); Q_UNUSED_PAR(stkSize); diff --git a/qpc.qm b/qpc.qm index 3369a8ac5..d27f88ef4 100644 --- a/qpc.qm +++ b/qpc.qm @@ -355,7 +355,7 @@ return me; // unhandled and need to "bubble up" Q_RET_SUPER, //!< event passed to superstate to handle Q_RET_SUPER_SUB, //!< event passed to submachine superstate - Q_RET_UNHANDLED, //!< event unhandled due to a guard + Q_RET_UNHANDLED, //!< event unhandled due to guard // handled and do not need to "bubble up" Q_RET_HANDLED, //!< event handled (internal transition) @@ -1258,7 +1258,7 @@ do { else if (r == Q_RET_SUPER_SUB) { t = me->temp.obj; // current host state of the submachine } - else { // event unhandled due to a guard? + else { // event unhandled due to a guard QF_CRIT_ENTRY(); // event must be unhandled due to a guard evaluating to 'false' Q_ASSERT_INCRIT(310, r == Q_RET_UNHANDLED); @@ -1455,40 +1455,11 @@ QF_CRIT_ENTRY(); Q_ENSURE_INCRIT(490, lbound > 0); QF_CRIT_EXIT(); -return inState; - - - - const - //! @private @memberof QMsm -//! @deprecated instead use: QASM_IS_IN() - -//! @private @memberof QMsm - - - bool inState = false; // assume that this SM is not in 'state' - -QMState const *s = me->super.state.obj; -int_fast8_t lbound = QMSM_MAX_NEST_DEPTH_; // fixed upper loop bound -for (; (s != (QMState *)0) && (lbound > 0); --lbound) { - if (s == stateObj) { // match found? - inState = true; - break; - } - else { - s = s->superstate; // advance to the superstate - } -} - -QF_CRIT_STAT -QF_CRIT_ENTRY(); -Q_ENSURE_INCRIT(590, lbound > 0); -QF_CRIT_EXIT(); - return inState; + const //! @public @memberof QMsm //! @public @memberof QMsm @@ -2324,22 +2295,22 @@ me->super.vptr = &vtable; // hook vptr to QActive vtable - - - //! @private @memberof QActive + + + //! @public @memberof QActive -//! @private @memberof QActive - +//! @public @memberof QActive + - + - + - + - + - + @@ -4684,26 +4655,6 @@ QF_gc(e); // recycle the referenced event (evtRef_) = (void *)0; \ } while (false) - - - - - - - - - - - - - - - - - \ - (QActive_start_((QActive *)(me_), (prioSpec_), \ - (qSto_), (qLen_), (stkSto_), (stkSize_), (par_))) - @@ -5160,22 +5111,22 @@ return 0; //! QActive active object class customization for QV - - + + //! @public @memberof QActive //! @public @memberof QActive - + - + - + - + - + - + Q_UNUSED_PAR(stkSto); // not needed in QV Q_UNUSED_PAR(stkSize); // not needed in QV @@ -5683,22 +5634,22 @@ return 0; // QActive class customization for QK - - + + //! @public @memberof QActive //! @public @memberof QActive - + - + - + - + - + - + Q_UNUSED_PAR(stkSto); // not needed in QK Q_UNUSED_PAR(stkSize); // not needed in QK @@ -6278,22 +6229,22 @@ return 0; // QActive active object class customization for QK - - + + //! @public @memberof QActive //! @public @memberof QActive - + - + - + - + - + - + QF_CRIT_STAT QF_CRIT_ENTRY(); @@ -6389,6 +6340,25 @@ me->super.super.state.act = Q_ACTION_CAST(0); // mark as extended thread QTimeEvt_ctorX(&me->timeEvt, &me->super, (enum_t)QXK_DELAY_SIG, tickRate); + + + //! @public @memberof QXThread + +//! @public @memberof QXThread + + + + + + + + + + + + + QActive_start(&me->super, prioSpec, qSto, qLen, stkSto, stkSize, par); + //! @public @memberof QXThread @@ -7364,25 +7334,6 @@ QF_CRIT_EXIT(); - - - - - - - - - - - - - - - - - QACTIVE_START((me_), (prioSpec_), (qSto_), (qLen_), \ - (stkSto_), (stkSize_), (par_)) - @@ -8196,22 +8147,22 @@ return 0; // return no error // QActive stub for QUTest - - + + //! @private @memberof QActive //! @private @memberof QActive - + - + - + - + - + - + Q_UNUSED_PAR(stkSto); Q_UNUSED_PAR(stkSize); @@ -9822,7 +9773,19 @@ extern char const Q_BUILD_TIME[9]; //! @deprecated plain 'char' is no longer forbidden in MISRA-C:2023 typedef char char_t; -//! @deprecated assertion failure handler +//! @deprecated Macro for starting an Active Object. +//! Use QActive::QActive_start() instead. +#define QACTIVE_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \ + (QActive_start((QActive *)(me_), (prioSpec_), \ + (qSto_), (qLen_), (stkSto_), (stkSize_), (par_))) + +//! @deprecated Macro for starting an eXtended Thread. +//! Use QXThread::QXThread_start() instead. +#define QXTHREAD_START(me_, prioSpec_, qSto_, qLen_, stkSto_, stkSize_, par_) \ + (QXThread_start((QXThread *)(me_), (prioSpec_), \ + (qSto_), (qLen_), (stkSto_), (stkSize_), (par_))) + +//! @deprecated Assertion failure handler. //! Use Q_onError() instead. #define Q_onAssert(module_, id_) Q_onError(module_, id_) @@ -9880,7 +9843,7 @@ static inline void QF_psInit( #define QHSM_DISPATCH(me_, e_, qsId_) QASM_DISPATCH((me_), (e_), (qsId_)) //! @deprecated instead use: QASM_IS_IN() -#define QHsm_isIn(me_, state_) QHsm_isIn_((QAsm *)(me_), (state_)) +#define QHsm_isIn(me_, state_) QASM_IS_IN((QAsm *)(me_), (state_)) //============================================================================ #if (QP_API_VERSION < 691) diff --git a/src/qf/qep_msm.c b/src/qf/qep_msm.c index 5eee98fcc..079abaa13 100644 --- a/src/qf/qep_msm.c +++ b/src/qf/qep_msm.c @@ -221,7 +221,7 @@ void QMsm_dispatch_( else if (r == Q_RET_SUPER_SUB) { t = me->temp.obj; // current host state of the submachine } - else { // event unhandled due to a guard? + else { // event unhandled due to a guard QF_CRIT_ENTRY(); // event must be unhandled due to a guard evaluating to 'false' Q_ASSERT_INCRIT(310, r == Q_RET_UNHANDLED); @@ -410,33 +410,6 @@ bool QMsm_isIn_( return inState; } -//${QEP::QMsm::isInState} .................................................... -//! @private @memberof QMsm -bool QMsm_isInState(QMsm const * const me, - QMState const * const stateObj) -{ - bool inState = false; // assume that this SM is not in 'state' - - QMState const *s = me->super.state.obj; - int_fast8_t lbound = QMSM_MAX_NEST_DEPTH_; // fixed upper loop bound - for (; (s != (QMState *)0) && (lbound > 0); --lbound) { - if (s == stateObj) { // match found? - inState = true; - break; - } - else { - s = s->superstate; // advance to the superstate - } - } - - QF_CRIT_STAT - QF_CRIT_ENTRY(); - Q_ENSURE_INCRIT(590, lbound > 0); - QF_CRIT_EXIT(); - - return inState; -} - //${QEP::QMsm::childStateObj} ................................................ //! @public @memberof QMsm QMState const * QMsm_childStateObj(QMsm const * const me, diff --git a/src/qk/qk.c b/src/qk/qk.c index ac362d40a..6bae74aea 100644 --- a/src/qk/qk.c +++ b/src/qk/qk.c @@ -435,9 +435,9 @@ int_t QF_run(void) { //${QK::QActive} ............................................................. -//${QK::QActive::start_} ..................................................... +//${QK::QActive::start} ...................................................... //! @public @memberof QActive -void QActive_start_(QActive * const me, +void QActive_start(QActive * const me, QPrioSpec const prioSpec, QEvt const * * const qSto, uint_fast16_t const qLen, diff --git a/src/qs/qutest.c b/src/qs/qutest.c index acffb636c..f88a76001 100644 --- a/src/qs/qutest.c +++ b/src/qs/qutest.c @@ -212,9 +212,9 @@ int_t QF_run(void) { //${QS::QUTest-stub::QActive} ................................................ -//${QS::QUTest-stub::QActive::start_} ........................................ +//${QS::QUTest-stub::QActive::start} ......................................... //! @private @memberof QActive -void QActive_start_(QActive * const me, +void QActive_start(QActive * const me, QPrioSpec const prioSpec, QEvt const * * const qSto, uint_fast16_t const qLen, diff --git a/src/qv/qv.c b/src/qv/qv.c index 7180adb5e..7a31e1d02 100644 --- a/src/qv/qv.c +++ b/src/qv/qv.c @@ -279,9 +279,9 @@ int_t QF_run(void) { //${QV::QActive} ............................................................. -//${QV::QActive::start_} ..................................................... +//${QV::QActive::start} ...................................................... //! @public @memberof QActive -void QActive_start_(QActive * const me, +void QActive_start(QActive * const me, QPrioSpec const prioSpec, QEvt const * * const qSto, uint_fast16_t const qLen, diff --git a/src/qxk/qxk.c b/src/qxk/qxk.c index d79e86e89..30ba8b4a4 100644 --- a/src/qxk/qxk.c +++ b/src/qxk/qxk.c @@ -472,9 +472,9 @@ int_t QF_run(void) { //${QXK::QActive} ............................................................ -//${QXK::QActive::start_} .................................................... +//${QXK::QActive::start} ..................................................... //! @public @memberof QActive -void QActive_start_(QActive * const me, +void QActive_start(QActive * const me, QPrioSpec const prioSpec, QEvt const * * const qSto, uint_fast16_t const qLen, diff --git a/test/qk/test_sched/test_sched.c b/test/qk/test_sched/test_sched.c index 246d915d4..9e71d64a8 100644 --- a/test/qk/test_sched/test_sched.c +++ b/test/qk/test_sched/test_sched.c @@ -144,7 +144,7 @@ int main() { for (uint8_t n = 0U; n < NUM_B; ++n) { if (pspecB[n] != 0U) { ObjB_ctor(&aoB[n]); // instantiate the AO - QACTIVE_START(&aoB[n].super, // AO to start + QActive_start(&aoB[n].super, // AO to start pspecB[n], // QF-prio/p-thre. aoB_queueSto[n], // event queue storage Q_DIM(aoB_queueSto[n]), // event length [events] diff --git a/test/qxk/test_sched/test_sched.c b/test/qxk/test_sched/test_sched.c index 0156c8add..06d2ae71a 100644 --- a/test/qxk/test_sched/test_sched.c +++ b/test/qxk/test_sched/test_sched.c @@ -188,7 +188,7 @@ int main() { for (n = 0U; n < NUM_B; ++n) { if (pspecB[n] != 0U) { ObjB_ctor(&aoB[n]); // instantiate the AO - QACTIVE_START(&aoB[n].super, // AO to start + QActive_start(&aoB[n].super, // AO to start pspecB[n], // QF-prio/p-thre. aoB_queueSto[n], // event queue storage Q_DIM(aoB_queueSto[n]), // event length [events] @@ -203,7 +203,7 @@ int main() { for (n = 0U; n < NUM_X; ++n) { QXThread_ctor(&thrX[n], &ThrX_run, 0U); // instantiate the thread if (pspecX[n] != 0U) { - QXTHREAD_START(&thrX[n], // thread to start + QXThread_start(&thrX[n], // thread to start pspecX[n], // QF-prio/p-thre. thrX_queueSto[n], // event queue storage Q_DIM(thrX_queueSto[n]), // event length [events] diff --git a/zephyr/qf_port.c b/zephyr/qf_port.c index 8028cf75f..92075d9dc 100644 --- a/zephyr/qf_port.c +++ b/zephyr/qf_port.c @@ -100,11 +100,11 @@ static void thread_entry(void *p1, void *p2, void *p3) { // // In the Zephyr port the generic function QActive_setAttr() is used to // set the options for the Zephyr thread (attr1) and thread name (attr2). -// QActive_setAttr() needs to be called *before* QACTIVE_START() for the +// QActive_setAttr() needs to be called *before* QActive_start() for the // given active object. // // In this Zephyr port the attributes will be used as follows -// (see also QActive_start_()): +// (see also QActive_start()): // - attr1 - will be used for thread options in k_thread_create() // - attr2 - will be used for thread name in k_thread_name_set() // @@ -113,10 +113,11 @@ void QActive_setAttr(QActive *const me, uint32_t attr1, void const *attr2) { me->thread.init_data = (void *)attr2; // will be used for thread name } //............................................................................ -void QActive_start_(QActive * const me, QPrioSpec const prioSpec, - QEvt const * * const qSto, uint_fast16_t const qLen, - void * const stkSto, uint_fast16_t const stkSize, - void const * const par) +void QActive_start(QActive * const me, + QPrioSpec const prioSpec, + QEvt const * * const qSto, uint_fast16_t const qLen, + void * const stkSto, uint_fast16_t const stkSize, + void const * const par) { me->prio = (uint8_t)(prioSpec & 0xFFU); // QF-priority of the AO me->pthre = 0U; // preemption-threshold (not used for AO registration)