mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-28 06:02:56 +08:00
5.9.8a
This commit is contained in:
parent
a3fc0e5871
commit
4116239a1f
@ -3,23 +3,23 @@ namespace QP {
|
|||||||
/** @page history Revision History
|
/** @page history Revision History
|
||||||
|
|
||||||
@section qpcpp_5_9_8 Version 5.9.8, 2017-09-15
|
@section qpcpp_5_9_8 Version 5.9.8, 2017-09-15
|
||||||
This release fixes the QXK kernel [bug#182 " Inconsistent QXThread::post_() behavior with respect to the 'margin' parameter"](https://sourceforge.net/p/qpc/bugs/182/).
|
This release fixes the QXK kernel [bug#182 " Inconsistent QXThread::post_() behavior with respect to the 'margin' parameter"](https://sourceforge.net/p/qpc/bugs/182/).
|
||||||
|
|
||||||
Also, the pre-condition assertion in the function QF::newRef_() (file `src/qf/qf_dyn.cpp`) has been modified to allow creating event references only for dynamic events `(e->poolId_ == 0)`.
|
Also, the pre-condition assertion in the function QF::newRef_() (file `src/qf/qf_dyn.cpp`) has been modified to allow creating event references only for dynamic events `(e->poolId_ == 0)`.
|
||||||
|
|
||||||
Modifed ARM Cortex-M examples with the GNU-ARM toolset to be compatible with C++ RTTI and C++ Exception handling, as follows:
|
Modifed ARM Cortex-M examples with the GNU-ARM toolset to be compatible with C++ RTTI and C++ Exception handling, as follows:
|
||||||
|
|
||||||
- removed definitions of `_init()` and `_fini()` from the GNU-ARM startup code for all supported boards in the `3rd_party` directory
|
- removed definitions of `_init()` and `_fini()` from the GNU-ARM startup code for all supported boards in the `3rd_party` directory
|
||||||
|
|
||||||
- added the empty definitions of `_init()` and `_fini()` to `mini_cpp.cpp` in the `3rd_party/gnu_cpp directory`
|
- added the empty definitions of `_init()` and `_fini()` to `mini_cpp.cpp` in the `3rd_party/gnu_cpp directory`
|
||||||
|
|
||||||
- Modified all GNU-ARM linker scripts (.ld files) to add the following symbols:
|
- Modified all GNU-ARM linker scripts (.ld files) to add the following symbols:
|
||||||
|
|
||||||
@verbatim
|
@verbatim
|
||||||
__exidx_start = .;
|
__exidx_start = .;
|
||||||
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >RAM
|
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } >RAM
|
||||||
__exidx_end = .;
|
__exidx_end = .;
|
||||||
@endverbatim
|
@endverbatim
|
||||||
|
|
||||||
Provided C++ example with RTTI and Exception hanlding in the directory:
|
Provided C++ example with RTTI and Exception hanlding in the directory:
|
||||||
`examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu_with-rtti`
|
`examples/arm-cm/dpp_efm32-slstk3401a/qxk/gnu_with-rtti`
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
License Type: Windows Single User License
|
License Type: Windows Single User License
|
||||||
Licensed To : Quantum Leaps, LLC
|
Licensed To : Quantum Leaps, LLC
|
||||||
License No. : WS2975 License Date: Dec 15, 2013
|
License No. : WS2975 License Date: Dec 15, 2013
|
||||||
Build Date : Sep 2 2009 Run Date: Sep 15, 2017
|
Build Date : Sep 2 2009 Run Date: Sep 24, 2017
|
||||||
(C)1996-2009 M Squared Technologies LLC
|
(C)1996-2009 M Squared Technologies LLC
|
||||||
________________________________________________________________________
|
________________________________________________________________________
|
||||||
|
|
||||||
@ -1064,11 +1064,9 @@
|
|||||||
Parameters: (QEvt const * const e, uint_fast16_t const margin)
|
Parameters: (QEvt const * const e, uint_fast16_t const margin)
|
||||||
Cyclomatic Complexity Vg Detail
|
Cyclomatic Complexity Vg Detail
|
||||||
Function Base : 1
|
Function Base : 1
|
||||||
Conditional if / else if: 5
|
Conditional if / else if: 8
|
||||||
Logical or ( || ) : 1
|
Complexity Param 2 Return 1 Cyclo Vg 9 Total 12
|
||||||
Logical and ( && ) : 1
|
LOC 72 eLOC 58 lLOC 39 Comment 68 Lines 94
|
||||||
Complexity Param 2 Return 1 Cyclo Vg 8 Total 11
|
|
||||||
LOC 59 eLOC 49 lLOC 34 Comment 63 Lines 81
|
|
||||||
|
|
||||||
Function: QP::QActive::postLIFO
|
Function: QP::QActive::postLIFO
|
||||||
Parameters: (QEvt const * const e)
|
Parameters: (QEvt const * const e)
|
||||||
@ -1129,27 +1127,27 @@
|
|||||||
|
|
||||||
~~ Total File Summary ~~
|
~~ Total File Summary ~~
|
||||||
|
|
||||||
LOC 218 eLOC 187 lLOC 105 Comment 230 Lines 412
|
LOC 231 eLOC 196 lLOC 110 Comment 235 Lines 425
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
~~ File Functional Summary ~~
|
~~ File Functional Summary ~~
|
||||||
|
|
||||||
File Function Count....: 9
|
File Function Count....: 9
|
||||||
Total Function LOC.....: 192 Total Function Pts LOC : 4.1
|
Total Function LOC.....: 205 Total Function Pts LOC : 4.4
|
||||||
Total Function eLOC....: 162 Total Function Pts eLOC: 3.5
|
Total Function eLOC....: 171 Total Function Pts eLOC: 3.7
|
||||||
Total Function lLOC....: 105 Total Function Pts lLOC: 2.0
|
Total Function lLOC....: 110 Total Function Pts lLOC: 2.1
|
||||||
Total Function Params .: 10 Total Function Return .: 9
|
Total Function Params .: 10 Total Function Return .: 9
|
||||||
Total Cyclo Complexity : 25 Total Function Complex.: 44
|
Total Cyclo Complexity : 26 Total Function Complex.: 45
|
||||||
------ ----- ----- ------ ------ -----
|
------ ----- ----- ------ ------ -----
|
||||||
Max Function LOC ......: 59 Average Function LOC ..: 21.33
|
Max Function LOC ......: 72 Average Function LOC ..: 22.78
|
||||||
Max Function eLOC .....: 49 Average Function eLOC .: 18.00
|
Max Function eLOC .....: 58 Average Function eLOC .: 19.00
|
||||||
Max Function lLOC .....: 34 Average Function lLOC .: 11.67
|
Max Function lLOC .....: 39 Average Function lLOC .: 12.22
|
||||||
------ ----- ----- ------ ------ -----
|
------ ----- ----- ------ ------ -----
|
||||||
Max Function Parameters: 2 Avg Function Parameters: 1.11
|
Max Function Parameters: 2 Avg Function Parameters: 1.11
|
||||||
Max Function Returns ..: 1 Avg Function Returns ..: 1.00
|
Max Function Returns ..: 1 Avg Function Returns ..: 1.00
|
||||||
Max Interface Complex. : 3 Avg Interface Complex. : 2.11
|
Max Interface Complex. : 3 Avg Interface Complex. : 2.11
|
||||||
Max Cyclomatic Complex.: 8 Avg Cyclomatic Complex.: 2.78
|
Max Cyclomatic Complex.: 9 Avg Cyclomatic Complex.: 2.89
|
||||||
Max Total Complexity ..: 11 Avg Total Complexity ..: 4.89
|
Max Total Complexity ..: 12 Avg Total Complexity ..: 5.00
|
||||||
________________________________________________________________________
|
________________________________________________________________________
|
||||||
End of File: ..\src\qf\qf_actq.cpp
|
End of File: ..\src\qf\qf_actq.cpp
|
||||||
|
|
||||||
@ -2233,9 +2231,9 @@
|
|||||||
|
|
||||||
~~ Total Project Summary ~~
|
~~ Total Project Summary ~~
|
||||||
|
|
||||||
LOC 4867 eLOC 4313 lLOC 1882 Comment 6438 Lines 11588
|
LOC 4880 eLOC 4322 lLOC 1887 Comment 6443 Lines 11601
|
||||||
Average per File, metric/37 files
|
Average per File, metric/37 files
|
||||||
LOC 131 eLOC 116 lLOC 50 Comment 174 Lines 313
|
LOC 131 eLOC 116 lLOC 51 Comment 174 Lines 313
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -2675,8 +2673,8 @@
|
|||||||
|
|
||||||
Function: QP::QActive::post_
|
Function: QP::QActive::post_
|
||||||
Parameters: (QEvt const * const e, uint_fast16_t const margin)
|
Parameters: (QEvt const * const e, uint_fast16_t const margin)
|
||||||
Complexity Param 2 Return 1 Cyclo Vg 8 Total 11
|
Complexity Param 2 Return 1 Cyclo Vg 9 Total 12
|
||||||
LOC 59 eLOC 49 lLOC 34 Comment 63 Lines 81
|
LOC 72 eLOC 58 lLOC 39 Comment 68 Lines 94
|
||||||
|
|
||||||
Function: QP::QActive::postLIFO
|
Function: QP::QActive::postLIFO
|
||||||
Parameters: (QEvt const * const e)
|
Parameters: (QEvt const * const e)
|
||||||
@ -3136,26 +3134,26 @@
|
|||||||
LOC 14 eLOC 11 lLOC 7 Comment 2 Lines 16
|
LOC 14 eLOC 11 lLOC 7 Comment 2 Lines 16
|
||||||
|
|
||||||
Total: Functions
|
Total: Functions
|
||||||
LOC 2739 eLOC 2284 lLOC 1362 InCmp 340 CycloCmp 464
|
LOC 2752 eLOC 2293 lLOC 1367 InCmp 340 CycloCmp 465
|
||||||
Function Points FP(LOC) 46.7 FP(eLOC) 39.5 FP(lLOC) 23.8
|
Function Points FP(LOC) 46.9 FP(eLOC) 39.7 FP(lLOC) 23.9
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
~~ Project Functional Analysis ~~
|
~~ Project Functional Analysis ~~
|
||||||
|
|
||||||
Total Functions .......: 175 Total Physical Lines ..: 3791
|
Total Functions .......: 175 Total Physical Lines ..: 3804
|
||||||
Total LOC .............: 2739 Total Function Pts LOC : 46.7
|
Total LOC .............: 2752 Total Function Pts LOC : 46.9
|
||||||
Total eLOC ............: 2284 Total Function Pts eLOC: 39.5
|
Total eLOC ............: 2293 Total Function Pts eLOC: 39.7
|
||||||
Total lLOC.............: 1362 Total Function Pts lLOC: 23.8
|
Total lLOC.............: 1367 Total Function Pts lLOC: 23.9
|
||||||
Total Cyclomatic Comp. : 464 Total Interface Comp. .: 340
|
Total Cyclomatic Comp. : 465 Total Interface Comp. .: 340
|
||||||
Total Parameters ......: 165 Total Return Points ...: 175
|
Total Parameters ......: 165 Total Return Points ...: 175
|
||||||
Total Comment Lines ...: 2692 Total Blank Lines .....: 513
|
Total Comment Lines ...: 2697 Total Blank Lines .....: 514
|
||||||
------ ----- ----- ------ ------ -----
|
------ ----- ----- ------ ------ -----
|
||||||
Avg Physical Lines ....: 21.66
|
Avg Physical Lines ....: 21.74
|
||||||
Avg LOC ...............: 15.65 Avg eLOC ..............: 13.05
|
Avg LOC ...............: 15.73 Avg eLOC ..............: 13.10
|
||||||
Avg lLOC ..............: 7.78 Avg Cyclomatic Comp. ..: 2.65
|
Avg lLOC ..............: 7.81 Avg Cyclomatic Comp. ..: 2.66
|
||||||
Avg Interface Comp. ...: 1.94 Avg Parameters ........: 0.94
|
Avg Interface Comp. ...: 1.94 Avg Parameters ........: 0.94
|
||||||
Avg Return Points .....: 1.00 Avg Comment Lines .....: 15.38
|
Avg Return Points .....: 1.00 Avg Comment Lines .....: 15.41
|
||||||
------ ----- ----- ------ ------ -----
|
------ ----- ----- ------ ------ -----
|
||||||
Max LOC ...............: 117
|
Max LOC ...............: 117
|
||||||
Max eLOC ..............: 100 Max lLOC ..............: 61
|
Max eLOC ..............: 100 Max lLOC ..............: 61
|
||||||
|
@ -122,7 +122,7 @@ QP_SRCS := \
|
|||||||
qf_qeq.cpp \
|
qf_qeq.cpp \
|
||||||
qf_qmact.cpp \
|
qf_qmact.cpp \
|
||||||
qf_time.cpp \
|
qf_time.cpp \
|
||||||
qk.cpp
|
qk.cpp
|
||||||
|
|
||||||
QP_ASMS := \
|
QP_ASMS := \
|
||||||
qk_port.s
|
qk_port.s
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
/// @brief QF/C++ port to embOS (v4.00) kernel, all supported compilers
|
/// @brief QF/C++ port to embOS (v4.00) kernel, all supported compilers
|
||||||
/// @cond
|
/// @cond
|
||||||
////**************************************************************************
|
////**************************************************************************
|
||||||
/// Last updated for version 5.9.3
|
/// Last updated for version 5.9.8
|
||||||
/// Last updated on 2017-06-19
|
/// Last updated on 2017-09-20
|
||||||
///
|
///
|
||||||
/// Q u a n t u m L e a P s
|
/// Q u a n t u m L e a P s
|
||||||
/// ---------------------------
|
/// ---------------------------
|
||||||
@ -159,9 +159,24 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
QF_CRIT_ENTRY_();
|
QF_CRIT_ENTRY_();
|
||||||
nFree = static_cast<uint_fast16_t>(m_eQueue.maxMsg - m_eQueue.nofMsg);
|
nFree = static_cast<uint_fast16_t>(m_eQueue.maxMsg - m_eQueue.nofMsg);
|
||||||
|
|
||||||
if (((margin == QF_NO_MARGIN) && (nFree > static_cast<QEQueueCtr>(0)))
|
if (margin == QF_NO_MARGIN) {
|
||||||
|| (nFree > static_cast<QEQueueCtr>(margin)))
|
if (nFree > static_cast<QEQueueCtr>(0)) {
|
||||||
{
|
status = true; // can post
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
Q_ERROR_ID(510); // must be able to post the event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (nFree > static_cast<QEQueueCtr>(margin)) {
|
||||||
|
status = true; // can post
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status) { // can post the event?
|
||||||
|
|
||||||
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO, QS::priv_.locFilter[QS::AO_OBJ], this)
|
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO, QS::priv_.locFilter[QS::AO_OBJ], this)
|
||||||
QS_TIME_(); // timestamp
|
QS_TIME_(); // timestamp
|
||||||
QS_OBJ_(sender); // the sender object
|
QS_OBJ_(sender); // the sender object
|
||||||
@ -179,15 +194,11 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
QF_CRIT_EXIT_();
|
QF_CRIT_EXIT_();
|
||||||
|
|
||||||
// posting to the embOS mailbox must succeed, see NOTE3
|
// posting to the embOS mailbox must succeed, see NOTE3
|
||||||
Q_ALLEGE_ID(510,
|
Q_ALLEGE_ID(520,
|
||||||
OS_PutMailCond(&m_eQueue, static_cast<OS_CONST_PTR void *>(&e))
|
OS_PutMailCond(&m_eQueue, static_cast<OS_CONST_PTR void *>(&e))
|
||||||
== static_cast<char>(0));
|
== static_cast<char>(0));
|
||||||
|
|
||||||
status = true; // report success
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// can tolerate dropping evts?
|
|
||||||
Q_ASSERT_ID(520, margin != QF_NO_MARGIN);
|
|
||||||
|
|
||||||
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_ATTEMPT,
|
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_ATTEMPT,
|
||||||
QS::priv_.locFilter[QS::AO_OBJ], this)
|
QS::priv_.locFilter[QS::AO_OBJ], this)
|
||||||
@ -201,8 +212,6 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
QS_END_NOCRIT_()
|
QS_END_NOCRIT_()
|
||||||
|
|
||||||
QF_CRIT_EXIT_();
|
QF_CRIT_EXIT_();
|
||||||
|
|
||||||
status = false; // report failure
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/// @cond
|
/// @cond
|
||||||
///***************************************************************************
|
///***************************************************************************
|
||||||
/// Last Updated for Version: QP 5.4.0/Qt 5.x
|
/// Last Updated for Version: QP 5.4.0/Qt 5.x
|
||||||
/// Last updated on 2015-05-03
|
/// Last updated on 2017-09-20
|
||||||
///
|
///
|
||||||
/// Q u a n t u m L e a P s
|
/// Q u a n t u m L e a P s
|
||||||
/// ---------------------------
|
/// ---------------------------
|
||||||
@ -30,8 +30,8 @@
|
|||||||
/// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
/// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
///
|
///
|
||||||
/// Contact information:
|
/// Contact information:
|
||||||
/// Web: www.state-machine.com
|
/// https://state-machine.com
|
||||||
/// Email: info@state-machine.com
|
/// mailto:info@state-machine.com
|
||||||
///***************************************************************************
|
///***************************************************************************
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
/// @brief QF/C++ port to ThreadX, all supported compilers
|
/// @brief QF/C++ port to ThreadX, all supported compilers
|
||||||
/// @cond
|
/// @cond
|
||||||
////**************************************************************************
|
////**************************************************************************
|
||||||
/// Last updated for version 5.9.3
|
/// Last updated for version 5.9.8
|
||||||
/// Last updated on 2017-06-19
|
/// Last updated on 2017-09-20
|
||||||
///
|
///
|
||||||
/// Q u a n t u m L e a P s
|
/// Q u a n t u m L e a P s
|
||||||
/// ---------------------------
|
/// ---------------------------
|
||||||
@ -143,9 +143,24 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
uint_fast16_t nFree =
|
uint_fast16_t nFree =
|
||||||
static_cast<uint_fast16_t>(m_eQueue.tx_queue_available_storage);
|
static_cast<uint_fast16_t>(m_eQueue.tx_queue_available_storage);
|
||||||
|
|
||||||
if (((margin == QF_NO_MARGIN) && (nFree > static_cast<QEQueueCtr>(0)))
|
if (margin == QF_NO_MARGIN) {
|
||||||
|| (nFree > static_cast<QEQueueCtr>(margin)))
|
if (nFree > static_cast<QEQueueCtr>(0)) {
|
||||||
{
|
status = true; // can post
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
Q_ERROR_ID(510); // must be able to post the event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (nFree > static_cast<QEQueueCtr>(margin)) {
|
||||||
|
status = true; // can post
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status) { // can post the event?
|
||||||
|
|
||||||
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO, QS::priv_.locFilter[QS::AO_OBJ], this)
|
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO, QS::priv_.locFilter[QS::AO_OBJ], this)
|
||||||
QS_TIME_(); // timestamp
|
QS_TIME_(); // timestamp
|
||||||
QS_OBJ_(sender); // the sender object
|
QS_OBJ_(sender); // the sender object
|
||||||
@ -164,15 +179,11 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
QF_CRIT_EXIT_();
|
QF_CRIT_EXIT_();
|
||||||
|
|
||||||
QEvt const *ep = const_cast<QEvt const *>(e);
|
QEvt const *ep = const_cast<QEvt const *>(e);
|
||||||
Q_ALLEGE_ID(510,
|
Q_ALLEGE_ID(520,
|
||||||
tx_queue_send(&m_eQueue, static_cast<VOID *>(&ep), TX_NO_WAIT)
|
tx_queue_send(&m_eQueue, static_cast<VOID *>(&ep), TX_NO_WAIT)
|
||||||
== TX_SUCCESS);
|
== TX_SUCCESS);
|
||||||
|
|
||||||
status = true; // report success
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// can tolerate dropping evts?
|
|
||||||
Q_ASSERT_ID(520, margin != QF_NO_MARGIN);
|
|
||||||
|
|
||||||
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_ATTEMPT,
|
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_ATTEMPT,
|
||||||
QS::priv_.locFilter[QS::AO_OBJ], this)
|
QS::priv_.locFilter[QS::AO_OBJ], this)
|
||||||
@ -186,8 +197,6 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
QS_END_NOCRIT_()
|
QS_END_NOCRIT_()
|
||||||
|
|
||||||
QF_CRIT_EXIT_();
|
QF_CRIT_EXIT_();
|
||||||
|
|
||||||
status = false; // report failure
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
/// @brief QF/C++ port to uC/OS-II (V2.92) kernel, all supported compilers
|
/// @brief QF/C++ port to uC/OS-II (V2.92) kernel, all supported compilers
|
||||||
/// @cond
|
/// @cond
|
||||||
////**************************************************************************
|
////**************************************************************************
|
||||||
/// Last updated for version 5.9.3
|
/// Last updated for version 5.9.8
|
||||||
/// Last updated on 2017-06-19
|
/// Last updated on 2017-09-20
|
||||||
///
|
///
|
||||||
/// Q u a n t u m L e a P s
|
/// Q u a n t u m L e a P s
|
||||||
/// ---------------------------
|
/// ---------------------------
|
||||||
@ -156,10 +156,26 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
reinterpret_cast<OS_Q_DATA *>(m_eQueue)->OSQSize
|
reinterpret_cast<OS_Q_DATA *>(m_eQueue)->OSQSize
|
||||||
- reinterpret_cast<OS_Q_DATA *>(m_eQueue)->OSNMsgs);
|
- reinterpret_cast<OS_Q_DATA *>(m_eQueue)->OSNMsgs);
|
||||||
|
|
||||||
if (((margin == QF_NO_MARGIN) && (nFree > static_cast<QEQueueCtr>(0)))
|
if (margin == QF_NO_MARGIN) {
|
||||||
|| (nFree > static_cast<QEQueueCtr>(margin)))
|
if (nFree > static_cast<QEQueueCtr>(0)) {
|
||||||
{
|
status = true; // can post
|
||||||
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO, QS::priv_.locFilter[QS::AO_OBJ], this)
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
Q_ERROR_ID(710); // must be able to post the event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (nFree > static_cast<QEQueueCtr>(margin)) {
|
||||||
|
status = true; // can post
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status) { // can post the event?
|
||||||
|
|
||||||
|
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO,
|
||||||
|
QS::priv_.locFilter[QS::AO_OBJ], this)
|
||||||
QS_TIME_(); // timestamp
|
QS_TIME_(); // timestamp
|
||||||
QS_OBJ_(sender); // the sender object
|
QS_OBJ_(sender); // the sender object
|
||||||
QS_SIG_(e->sig); // the signal of the event
|
QS_SIG_(e->sig); // the signal of the event
|
||||||
@ -176,14 +192,10 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
QF_CRIT_EXIT_();
|
QF_CRIT_EXIT_();
|
||||||
|
|
||||||
// posting the event to uC/OS-II message queue must succeed
|
// posting the event to uC/OS-II message queue must succeed
|
||||||
Q_ALLEGE_ID(710,
|
Q_ALLEGE_ID(720,
|
||||||
OSQPost(m_eQueue, const_cast<QEvt *>(e)) == OS_ERR_NONE);
|
OSQPost(m_eQueue, const_cast<QEvt *>(e)) == OS_ERR_NONE);
|
||||||
|
|
||||||
status = true; // report success
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// can tolerate dropping evts?
|
|
||||||
Q_ASSERT_ID(520, margin != QF_NO_MARGIN);
|
|
||||||
|
|
||||||
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_ATTEMPT,
|
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_ATTEMPT,
|
||||||
QS::priv_.locFilter[QS::AO_OBJ], this)
|
QS::priv_.locFilter[QS::AO_OBJ], this)
|
||||||
@ -197,8 +209,6 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
QS_END_NOCRIT_()
|
QS_END_NOCRIT_()
|
||||||
|
|
||||||
QF_CRIT_EXIT_();
|
QF_CRIT_EXIT_();
|
||||||
|
|
||||||
status = false; // report failure
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -208,7 +218,8 @@ void QActive::postLIFO(QEvt const * const e) {
|
|||||||
QF_CRIT_STAT_
|
QF_CRIT_STAT_
|
||||||
QF_CRIT_ENTRY_();
|
QF_CRIT_ENTRY_();
|
||||||
|
|
||||||
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_LIFO, QS::priv_.locFilter[QS::AO_OBJ], this)
|
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_LIFO,
|
||||||
|
QS::priv_.locFilter[QS::AO_OBJ], this)
|
||||||
QS_TIME_(); // timestamp
|
QS_TIME_(); // timestamp
|
||||||
QS_SIG_(e->sig); // the signal of this event
|
QS_SIG_(e->sig); // the signal of this event
|
||||||
QS_OBJ_(this); // this active object
|
QS_OBJ_(this); // this active object
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
/// @cond
|
/// @cond
|
||||||
///***************************************************************************
|
///***************************************************************************
|
||||||
/// Last updated for version 5.9.8
|
/// Last updated for version 5.9.8
|
||||||
/// Last updated on 2017-09-07
|
/// Last updated on 2017-09-20
|
||||||
///
|
///
|
||||||
/// Q u a n t u m L e a P s
|
/// Q u a n t u m L e a P s
|
||||||
/// ---------------------------
|
/// ---------------------------
|
||||||
@ -100,10 +100,23 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
QF_CRIT_ENTRY_();
|
QF_CRIT_ENTRY_();
|
||||||
QEQueueCtr nFree = m_eQueue.m_nFree; // get volatile into the temporary
|
QEQueueCtr nFree = m_eQueue.m_nFree; // get volatile into the temporary
|
||||||
|
|
||||||
// margin available?
|
if (margin == QF_NO_MARGIN) {
|
||||||
if (((margin == QF_NO_MARGIN) && (nFree > static_cast<QEQueueCtr>(0)))
|
if (nFree > static_cast<QEQueueCtr>(0)) {
|
||||||
|| (nFree > static_cast<QEQueueCtr>(margin)))
|
status = true; // can post
|
||||||
{
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
Q_ERROR_ID(110); // must be able to post the event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (nFree > static_cast<QEQueueCtr>(margin)) {
|
||||||
|
status = true; // can post
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status) { // can post the event?
|
||||||
|
|
||||||
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO,
|
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO,
|
||||||
QS::priv_.locFilter[QS::AO_OBJ], this)
|
QS::priv_.locFilter[QS::AO_OBJ], this)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
/// @cond
|
/// @cond
|
||||||
///***************************************************************************
|
///***************************************************************************
|
||||||
/// Last updated for version 5.9.8
|
/// Last updated for version 5.9.8
|
||||||
/// Last updated on 2017-09-07
|
/// Last updated on 2017-09-20
|
||||||
///
|
///
|
||||||
/// Q u a n t u m L e a P s
|
/// Q u a n t u m L e a P s
|
||||||
/// ---------------------------
|
/// ---------------------------
|
||||||
@ -100,10 +100,23 @@ bool QActive::post_(QEvt const * const e, uint_fast16_t const margin,
|
|||||||
QF_CRIT_ENTRY_();
|
QF_CRIT_ENTRY_();
|
||||||
QEQueueCtr nFree = m_eQueue.m_nFree; // get volatile into the temporary
|
QEQueueCtr nFree = m_eQueue.m_nFree; // get volatile into the temporary
|
||||||
|
|
||||||
// margin available?
|
if (margin == QF_NO_MARGIN) {
|
||||||
if (((margin == QF_NO_MARGIN) && (nFree > static_cast<QEQueueCtr>(0)))
|
if (nFree > static_cast<QEQueueCtr>(0)) {
|
||||||
|| (nFree > static_cast<QEQueueCtr>(margin)))
|
status = true; // can post
|
||||||
{
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
Q_ERROR_ID(110); // must be able to post the event
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (nFree > static_cast<QEQueueCtr>(margin)) {
|
||||||
|
status = true; // can post
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
status = false; // cannot post
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status) { // can post the event?
|
||||||
|
|
||||||
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO,
|
QS_BEGIN_NOCRIT_(QS_QF_ACTIVE_POST_FIFO,
|
||||||
QS::priv_.locFilter[QS::AO_OBJ], this)
|
QS::priv_.locFilter[QS::AO_OBJ], this)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user