QL 5 ani în urmă
părinte
comite
d84b4ebd9c

+ 5 - 5
doxygen/history.dox

@@ -52,7 +52,7 @@ Additionally, this release introduces the new pre-defined QS record #QS_QF_NEW_A
 The reversal of #QS_QF_NEW and #QS_QF_MPOOL_GET trace records has implications for the existing [<b>QUTest test scripts</b>](https://www.state-machine.com/qtools/qutest_script.html), where the order of expectations for "QF-New" and "MP-Get" needs to be reversed as well.
 
 
-Additionally, this release modifies the @ref qxk "QXK" source code, so that the `QActive.prio` attribute is the fixed priority assigned in QActive_start(), while `QActive.dynPrio` is the "dynamic" priority that can be changed when a @ref qxk_extended "QXK extended thread" acquires a @ref ::QXMutex "mutex".  
+Additionally, this release modifies the @ref qxk "QXK" source code, so that the `QActive.prio` attribute is the fixed priority assigned in QActive_start(), while `QActive.dynPrio` is the "dynamic" priority that can be changed when a @ref qxk_extended "QXK extended thread" acquires a @ref ::QXMutex "mutex".
 
 
 __Updated Ports:__
@@ -60,10 +60,10 @@ __Updated Ports:__
 - all ARM Cortex-M ports (added workaround for the [<b>ARM Erratum 838869</b>](https://www.state-machine.com/doc/Cortex-M4_Software_Developers_Errata_Notice_v3.pdf))
 - all QK ports (because of the changed QMPool_get() / QMPool_put() interface)
 - all QXK ports (because of the changed QMPool_get() / QMPool_put() interface)
-- embOS port (because of the changed QMPool_get() / QMPool_put() interface)  
-- FreeRTOS port (because of the changed QMPool_get() / QMPool_put() interface)  
-- ThreadX port (because of the changed QMPool_get() / QMPool_put() interface)  
-- uC/OS-II port (because of the changed QMPool_get() / QMPool_put() interface)  
+- embOS port (because of the changed QMPool_get() / QMPool_put() interface)
+- FreeRTOS port (because of the changed QMPool_get() / QMPool_put() interface)
+- ThreadX port (because of the changed QMPool_get() / QMPool_put() interface)
+- uC/OS-II port (because of the changed QMPool_get() / QMPool_put() interface)
 - posix, posix-qv (because of the changed QMPool_get() / QMPool_put() interface)
 - win32, win32-qv (because of the changed QMPool_get() / QMPool_put() interface)
 

+ 168 - 168
doxygen/metrics.dox

@@ -1,168 +1,168 @@
-/** @page metrics Code Metrics 
-
-@code{cpp} 
-                   Code Metrics for QP/C 
-================================================
-  NLOC    CCN   token  PARAM  length  location  
-------------------------------------------------
-       6      1     23      1      15 Q_DEFINE_THIS_MODULE@50-64@..\src\qf\qep_hsm.c
-       9      1     53      2       9 QHsm_ctor@134-142@..\src\qf\qep_hsm.c
-      49      8    359      2      73 QHsm_init_@159-231@..\src\qf\qep_hsm.c
-       5      1     32      2       5 QHsm_top@248-252@..\src\qf\qep_hsm.c
-     104     16    658      2     153 QHsm_dispatch_@272-424@..\src\qf\qep_hsm.c
-      97     15    492      2     133 QHsm_tran_@445-577@..\src\qf\qep_hsm.c
-      16      3    105      2      22 QHsm_isIn@593-614@..\src\qf\qep_hsm.c
-      22      4    131      2      30 QHsm_childState_@639-668@..\src\qf\qep_hsm.c
-       4      1     10      1       8 Q_DEFINE_THIS_MODULE@50-57@..\src\qf\qep_msm.c
-       9      1     56      2      10 QMsm_ctor@136-145@..\src\qf\qep_msm.c
-      25      5    213      2      45 QMsm_init_@164-208@..\src\qf\qep_msm.c
-     122     23    845      2     185 QMsm_dispatch_@229-413@..\src\qf\qep_msm.c
-      50      9    332      2      63 QMsm_execTatbl_@437-499@..\src\qf\qep_msm.c
-      20      4    120      3      28 QMsm_exitToTranSource_@519-546@..\src\qf\qep_msm.c
-      41      6    239      2      50 QMsm_enterHistory_@567-616@..\src\qf\qep_msm.c
-      11      3     71      2      12 QMsm_isInState@633-644@..\src\qf\qep_msm.c
-      22      4    105      2      28 QMsm_childStateObj_@664-691@..\src\qf\qep_msm.c
-      10      3     64      1      17 QF_add_@70-86@..\src\qf\qf_act.c
-      10      3     78      1      16 QF_remove_@103-118@..\src\qf\qf_act.c
-       8      2     50      2       8 QF_bzero@144-151@..\src\qf\qf_act.c
-      24      6    143      1      29 QF_LOG2@156-184@..\src\qf\qf_act.c
-      84     13    468      3     121 QActive_post_@95-215@..\src\qf\qf_actq.c
-      46      7    293      2      68 QActive_postLIFO_@235-302@..\src\qf\qf_actq.c
-      36      3    237      1      46 QActive_get_@326-371@..\src\qf\qf_actq.c
-      10      2     61      1      13 QF_getQueueMin@392-404@..\src\qf\qf_actq.c
-      12      1     75      2      14 QTicker_ctor@438-451@..\src\qf\qf_actq.c
-       7      2     39      2      10 QTicker_init_@457-466@..\src\qf\qf_actq.c
-      14      3     87      2      20 QTicker_dispatch_@472-491@..\src\qf\qf_actq.c
-      27      2    150      4      36 QTicker_post_@497-532@..\src\qf\qf_actq.c
-       5      1     30      2       5 QTicker_postLIFO_@534-538@..\src\qf\qf_actq.c
-      15      1     88      3      18 QActive_defer@78-95@..\src\qf\qf_defer.c
-      32      3    168      2      52 QActive_recall@119-170@..\src\qf\qf_defer.c
-      12      2     74      2      14 QActive_flushDeferred@188-201@..\src\qf\qf_defer.c
-       5      1     37      2       6 QEvt_ctor@69-74@..\src\qf\qf_dyn.c
-      15      3    107      3      23 QF_poolInit@113-135@..\src\qf\qf_dyn.c
-      37      7    234      3      51 QF_newX_@164-214@..\src\qf\qf_dyn.c
-      30      4    185      1      47 QF_gc@240-286@..\src\qf\qf_dyn.c
-      16      2     94      2      24 QF_newRef_@303-326@..\src\qf\qf_dyn.c
-      11      1     67      1      13 QF_deleteRef_@338-350@..\src\qf\qf_dyn.c
-       3      1     17      1       3 QF_poolGetMaxBlockSize@357-359@..\src\qf\qf_dyn.c
-      32      5    233      4      47 QMPool_init@89-135@..\src\qf\qf_mem.c
-      16      2    113      3      24 QMPool_put@159-182@..\src\qf\qf_mem.c
-      43      4    238      3      67 QMPool_get@213-279@..\src\qf\qf_mem.c
-      10      3     60      1      14 QF_getPoolMin@294-307@..\src\qf\qf_mem.c
-       5      1     35      2      10 QF_psInit@87-96@..\src\qf\qf_ps.c
-      37      5    210      2      65 QF_publish_@121-185@..\src\qf\qf_ps.c
-      16      5    112      2      22 QActive_subscribe@206-227@..\src\qf\qf_ps.c
-      16      5    112      2      25 QActive_unsubscribe@254-278@..\src\qf\qf_ps.c
-      20      5    135      1      25 QActive_unsubscribeAll@303-327@..\src\qf\qf_ps.c
-      12      1     68      2      17 QActive_ctor@66-82@..\src\qf\qf_qact.c
-      13      2     85      3      13 QEQueue_init@72-84@..\src\qf\qf_qeq.c
-      56      8    305      4      76 QEQueue_post@115-190@..\src\qf\qf_qeq.c
-      37      5    204      3      49 QEQueue_postLIFO@215-263@..\src\qf\qf_qeq.c
-      37      4    221      2      48 QEQueue_get@284-331@..\src\qf\qf_qeq.c
-      12      1     76      2      28 QMActive_ctor@67-94@..\src\qf\qf_qmact.c
-      66      7    367      1      97 QF_tickX_@80-176@..\src\qf\qf_time.c
-      13      3     66      1      14 QF_noTimeEvtsActiveX@205-218@..\src\qf\qf_time.c
-      13      2     99      4      30 QTimeEvt_ctorX@238-267@..\src\qf\qf_time.c
-      31      8    223      3      57 QTimeEvt_armX@297-353@..\src\qf\qf_time.c
-      31      3    178      1      40 QTimeEvt_disarm@374-413@..\src\qf\qf_time.c
-      33      8    229      2      60 QTimeEvt_rearm@436-495@..\src\qf\qf_time.c
-       5      2     41      1       5 QTimeEvt_wasDisarmed@519-523@..\src\qf\qf_time.c
-       8      1     31      1      10 QTimeEvt_currCtr@541-550@..\src\qf\qf_time.c
-      11      2     76      1      16 QF_init@72-87@..\src\qk\qk.c
-       3      1     10      1       4 QF_stop@107-110@..\src\qk\qk.c
-       6      2     26      1       8 initial_events@115-122@..\src\qk\qk.c
-      12      3     45      1      19 QF_run@133-151@..\src\qk\qk.c
-      21      5    144      7      32 QActive_start_@175-206@..\src\qk\qk.c
-      22      2    111      1      33 QK_schedLock@230-262@..\src\qk\qk.c
-      21      4    121      1      33 QK_schedUnlock@280-312@..\src\qk\qk.c
-      15      3     78      1      19 QK_sched_@329-347@..\src\qk\qk.c
-      62     16    359      1     106 QK_activate_@359-464@..\src\qk\qk.c
-       9      2     64      1      13 QF_init@73-85@..\src\qv\qv.c
-       3      1     10      1       4 QF_stop@104-107@..\src\qv\qv.c
-      42      9    200      1      80 QF_run@117-196@..\src\qv\qv.c
-      14      3    114      7      20 QActive_start_@220-239@..\src\qv\qv.c
-      14      2    108      1      22 QF_init@75-96@..\src\qxk\qxk.c
-       3      1     10      1       4 QF_stop@115-118@..\src\qxk\qxk.c
-       6      2     26      1       8 initial_events@123-130@..\src\qxk\qxk.c
-      12      3     45      1      20 QF_run@140-159@..\src\qxk\qxk.c
-      23      6    164      7      34 QActive_start_@184-217@..\src\qxk\qxk.c
-      23      3    130      1      34 QXK_schedLock@249-282@..\src\qxk\qxk.c
-      20      4    121      1      33 QXK_schedUnlock@305-337@..\src\qxk\qxk.c
-      49      7    271      1      67 QXK_sched_@353-419@..\src\qxk\qxk.c
-      75     16    477      1     132 QXK_activate_@431-562@..\src\qxk\qxk.c
-      13      2     74      1      20 QXK_current@565-584@..\src\qxk\qxk.c
-      16      4    113      2      25 QXMutex_init@87-111@..\src\qxk\qxk_mutex.c
-      71     12    544      2     113 QXMutex_lock@134-246@..\src\qxk\qxk_mutex.c
-      44     10    319      1      68 QXMutex_tryLock@269-336@..\src\qxk\qxk_mutex.c
-      67     16    506      1     115 QXMutex_unlock@358-472@..\src\qxk\qxk_mutex.c
-       8      1     49      3      10 QXSemaphore_init@79-88@..\src\qxk\qxk_sema.c
-      44      7    321      2      69 QXSemaphore_wait@114-182@..\src\qxk\qxk_sema.c
-      15      2     61      1      20 QXSemaphore_tryWait@199-218@..\src\qxk\qxk_sema.c
-      30      6    197      1      49 QXSemaphore_signal@240-288@..\src\qxk\qxk_sema.c
-      18      1    109      3      21 QXThread_ctor@113-133@..\src\qxk\qxk_xthr.c
-       8      2     38      3      11 QXThread_init_@140-150@..\src\qxk\qxk_xthr.c
-       8      2     38      3      11 QXThread_dispatch_@156-166@..\src\qxk\qxk_xthr.c
-      25      6    202      7      47 QXThread_start_@193-239@..\src\qxk\qxk_xthr.c
-      97     13    519      3     131 QXThread_post_@284-414@..\src\qxk\qxk_xthr.c
-       5      1     30      2       5 QXThread_postLIFO_@427-431@..\src\qxk\qxk_xthr.c
-      60      7    499      1      86 QXThread_queueGet@453-538@..\src\qxk\qxk_xthr.c
-       5      1     51      1       7 QXThread_block_@548-554@..\src\qxk\qxk_xthr.c
-       8      3     58      1       8 QXThread_unblock_@564-571@..\src\qxk\qxk_xthr.c
-      19      3    155      3      37 QXThread_teArm_@582-618@..\src\qxk\qxk_xthr.c
-      11      2     46      1      13 QXThread_teDisarm_@628-640@..\src\qxk\qxk_xthr.c
-      21      3    195      1      37 QXThread_delay@644-680@..\src\qxk\qxk_xthr.c
-      14      2     68      1      16 QXThread_delayCancel@684-699@..\src\qxk\qxk_xthr.c
-      15      2    108      1      25 QXK_threadRet_@712-736@..\src\qxk\qxk_xthr.c
-36 file analyzed.
-==============================================================
-NLOC    Avg.NLOC  AvgCCN  Avg.token  function_cnt    file
---------------------------------------------------------------
-      5       0.0     0.0        0.0         0     ..\include\qassert.h
-    101       0.0     0.0        0.0         0     ..\include\qep.h
-     19       0.0     0.0        0.0         0     ..\include\qequeue.h
-     89       0.0     0.0        0.0         0     ..\include\qf.h
-     20       0.0     0.0        0.0         0     ..\include\qk.h
-     21       0.0     0.0        0.0         0     ..\include\qmpool.h
-      7       0.0     0.0        0.0         0     ..\include\qpc.h
-     10       0.0     0.0        0.0         0     ..\include\qpset.h
-    271       0.0     0.0        0.0         0     ..\include\qs.h
-      3       0.0     0.0        0.0         0     ..\include\qstamp.c
-      2       0.0     0.0        0.0         0     ..\include\qstamp.h
-      0       0.0     0.0        0.0         0     ..\include\qs_dummy.h
-      5       0.0     0.0        0.0         0     ..\include\qv.h
-     23       0.0     0.0        0.0         0     ..\include\qxk.h
-     32       0.0     0.0        0.0         0     ..\include\qxthread.h
-    331      38.5     6.1      231.6         8     ..\src\qf\qep_hsm.c
-    341      33.8     6.2      221.2         9     ..\src\qf\qep_msm.c
-     60      13.0     3.5       83.8         4     ..\src\qf\qf_act.c
-    267      26.8     3.8      160.0         9     ..\src\qf\qf_actq.c
-     66      19.7     2.0      110.0         3     ..\src\qf\qf_defer.c
-    126      16.7     2.7      105.9         7     ..\src\qf\qf_dyn.c
-    108      25.2     3.5      161.0         4     ..\src\qf\qf_mem.c
-    104      18.8     4.2      120.8         5     ..\src\qf\qf_ps.c
-     14      12.0     1.0       68.0         1     ..\src\qf\qf_qact.c
-    150      35.8     4.8      203.8         4     ..\src\qf\qf_qeq.c
-     14      12.0     1.0       76.0         1     ..\src\qf\qf_qmact.c
-    209      25.0     4.2      154.2         8     ..\src\qf\qf_time.c
-    182      19.2     4.2      107.8         9     ..\src\qk\qk.c
-     76      17.0     3.8       97.0         4     ..\src\qv\qv.c
-    248      23.8     4.6      142.6        10     ..\src\qxk\qxk.c
-    205      49.5    10.5      370.5         4     ..\src\qxk\qxk_mutex.c
-    104      24.2     4.0      157.0         4     ..\src\qxk\qxk_sema.c
-    341      22.4     3.4      151.1        14     ..\src\qxk\qxk_xthr.c
-     19       0.0     0.0        0.0         0     ..\src\qf_pkg.h
-     11       0.0     0.0        0.0         0     ..\src\qs_pkg.h
-     16       0.0     0.0        0.0         0     ..\src\qxk_pkg.h
-
-=========================================================================================================
-!!!! Warnings (cyclomatic_complexity > 20 or length > 500 or nloc > 1000000 or parameter_count > 10) !!!!
-================================================
-  NLOC    CCN   token  PARAM  length  location  
-------------------------------------------------
-     122     23    845      2     185 QMsm_dispatch_@229-413@..\src\qf\qep_msm.c
-==========================================================================================
-Total nloc   Avg.NLOC  AvgCCN  Avg.token   Fun Cnt  Warning cnt   Fun Rt   nloc Rt
-------------------------------------------------------------------------------------------
-      3600      25.3     4.4      158.7      108            1      0.01    0.04
-@endcode 
-*/ 
+/** @page metrics Code Metrics
+
+@code{cpp}
+                   Code Metrics for QP/C
+================================================
+  NLOC    CCN   token  PARAM  length  location
+------------------------------------------------
+       6      1     23      1      15 Q_DEFINE_THIS_MODULE@50-64@..\src\qf\qep_hsm.c
+       9      1     53      2       9 QHsm_ctor@134-142@..\src\qf\qep_hsm.c
+      49      8    359      2      73 QHsm_init_@159-231@..\src\qf\qep_hsm.c
+       5      1     32      2       5 QHsm_top@248-252@..\src\qf\qep_hsm.c
+     104     16    658      2     153 QHsm_dispatch_@272-424@..\src\qf\qep_hsm.c
+      97     15    492      2     133 QHsm_tran_@445-577@..\src\qf\qep_hsm.c
+      16      3    105      2      22 QHsm_isIn@593-614@..\src\qf\qep_hsm.c
+      22      4    131      2      30 QHsm_childState_@639-668@..\src\qf\qep_hsm.c
+       4      1     10      1       8 Q_DEFINE_THIS_MODULE@50-57@..\src\qf\qep_msm.c
+       9      1     56      2      10 QMsm_ctor@136-145@..\src\qf\qep_msm.c
+      25      5    213      2      45 QMsm_init_@164-208@..\src\qf\qep_msm.c
+     122     23    845      2     185 QMsm_dispatch_@229-413@..\src\qf\qep_msm.c
+      50      9    332      2      63 QMsm_execTatbl_@437-499@..\src\qf\qep_msm.c
+      20      4    120      3      28 QMsm_exitToTranSource_@519-546@..\src\qf\qep_msm.c
+      41      6    239      2      50 QMsm_enterHistory_@567-616@..\src\qf\qep_msm.c
+      11      3     71      2      12 QMsm_isInState@633-644@..\src\qf\qep_msm.c
+      22      4    105      2      28 QMsm_childStateObj_@664-691@..\src\qf\qep_msm.c
+      10      3     64      1      17 QF_add_@70-86@..\src\qf\qf_act.c
+      10      3     78      1      16 QF_remove_@103-118@..\src\qf\qf_act.c
+       8      2     50      2       8 QF_bzero@144-151@..\src\qf\qf_act.c
+      24      6    143      1      29 QF_LOG2@156-184@..\src\qf\qf_act.c
+      84     13    468      3     121 QActive_post_@95-215@..\src\qf\qf_actq.c
+      46      7    293      2      68 QActive_postLIFO_@235-302@..\src\qf\qf_actq.c
+      36      3    237      1      46 QActive_get_@326-371@..\src\qf\qf_actq.c
+      10      2     61      1      13 QF_getQueueMin@392-404@..\src\qf\qf_actq.c
+      12      1     75      2      14 QTicker_ctor@438-451@..\src\qf\qf_actq.c
+       7      2     39      2      10 QTicker_init_@457-466@..\src\qf\qf_actq.c
+      14      3     87      2      20 QTicker_dispatch_@472-491@..\src\qf\qf_actq.c
+      27      2    150      4      36 QTicker_post_@497-532@..\src\qf\qf_actq.c
+       5      1     30      2       5 QTicker_postLIFO_@534-538@..\src\qf\qf_actq.c
+      15      1     88      3      18 QActive_defer@78-95@..\src\qf\qf_defer.c
+      32      3    168      2      52 QActive_recall@119-170@..\src\qf\qf_defer.c
+      12      2     74      2      14 QActive_flushDeferred@188-201@..\src\qf\qf_defer.c
+       5      1     37      2       6 QEvt_ctor@69-74@..\src\qf\qf_dyn.c
+      15      3    107      3      23 QF_poolInit@113-135@..\src\qf\qf_dyn.c
+      37      7    234      3      51 QF_newX_@164-214@..\src\qf\qf_dyn.c
+      30      4    185      1      47 QF_gc@240-286@..\src\qf\qf_dyn.c
+      16      2     94      2      24 QF_newRef_@303-326@..\src\qf\qf_dyn.c
+      11      1     67      1      13 QF_deleteRef_@338-350@..\src\qf\qf_dyn.c
+       3      1     17      1       3 QF_poolGetMaxBlockSize@357-359@..\src\qf\qf_dyn.c
+      32      5    233      4      47 QMPool_init@89-135@..\src\qf\qf_mem.c
+      16      2    113      3      24 QMPool_put@159-182@..\src\qf\qf_mem.c
+      43      4    238      3      67 QMPool_get@213-279@..\src\qf\qf_mem.c
+      10      3     60      1      14 QF_getPoolMin@294-307@..\src\qf\qf_mem.c
+       5      1     35      2      10 QF_psInit@87-96@..\src\qf\qf_ps.c
+      37      5    210      2      65 QF_publish_@121-185@..\src\qf\qf_ps.c
+      16      5    112      2      22 QActive_subscribe@206-227@..\src\qf\qf_ps.c
+      16      5    112      2      25 QActive_unsubscribe@254-278@..\src\qf\qf_ps.c
+      20      5    135      1      25 QActive_unsubscribeAll@303-327@..\src\qf\qf_ps.c
+      12      1     68      2      17 QActive_ctor@66-82@..\src\qf\qf_qact.c
+      13      2     85      3      13 QEQueue_init@72-84@..\src\qf\qf_qeq.c
+      56      8    305      4      76 QEQueue_post@115-190@..\src\qf\qf_qeq.c
+      37      5    204      3      49 QEQueue_postLIFO@215-263@..\src\qf\qf_qeq.c
+      37      4    221      2      48 QEQueue_get@284-331@..\src\qf\qf_qeq.c
+      12      1     76      2      28 QMActive_ctor@67-94@..\src\qf\qf_qmact.c
+      66      7    367      1      97 QF_tickX_@80-176@..\src\qf\qf_time.c
+      13      3     66      1      14 QF_noTimeEvtsActiveX@205-218@..\src\qf\qf_time.c
+      13      2     99      4      30 QTimeEvt_ctorX@238-267@..\src\qf\qf_time.c
+      31      8    223      3      57 QTimeEvt_armX@297-353@..\src\qf\qf_time.c
+      31      3    178      1      40 QTimeEvt_disarm@374-413@..\src\qf\qf_time.c
+      33      8    229      2      60 QTimeEvt_rearm@436-495@..\src\qf\qf_time.c
+       5      2     41      1       5 QTimeEvt_wasDisarmed@519-523@..\src\qf\qf_time.c
+       8      1     31      1      10 QTimeEvt_currCtr@541-550@..\src\qf\qf_time.c
+      11      2     76      1      16 QF_init@72-87@..\src\qk\qk.c
+       3      1     10      1       4 QF_stop@107-110@..\src\qk\qk.c
+       6      2     26      1       8 initial_events@115-122@..\src\qk\qk.c
+      12      3     45      1      19 QF_run@133-151@..\src\qk\qk.c
+      21      5    144      7      32 QActive_start_@175-206@..\src\qk\qk.c
+      22      2    111      1      33 QK_schedLock@230-262@..\src\qk\qk.c
+      21      4    121      1      33 QK_schedUnlock@280-312@..\src\qk\qk.c
+      15      3     78      1      19 QK_sched_@329-347@..\src\qk\qk.c
+      62     16    359      1     106 QK_activate_@359-464@..\src\qk\qk.c
+       9      2     64      1      13 QF_init@73-85@..\src\qv\qv.c
+       3      1     10      1       4 QF_stop@104-107@..\src\qv\qv.c
+      42      9    200      1      80 QF_run@117-196@..\src\qv\qv.c
+      14      3    114      7      20 QActive_start_@220-239@..\src\qv\qv.c
+      14      2    108      1      22 QF_init@75-96@..\src\qxk\qxk.c
+       3      1     10      1       4 QF_stop@115-118@..\src\qxk\qxk.c
+       6      2     26      1       8 initial_events@123-130@..\src\qxk\qxk.c
+      12      3     45      1      20 QF_run@140-159@..\src\qxk\qxk.c
+      23      6    164      7      34 QActive_start_@184-217@..\src\qxk\qxk.c
+      23      3    130      1      34 QXK_schedLock@249-282@..\src\qxk\qxk.c
+      20      4    121      1      33 QXK_schedUnlock@305-337@..\src\qxk\qxk.c
+      49      7    271      1      67 QXK_sched_@353-419@..\src\qxk\qxk.c
+      75     16    477      1     132 QXK_activate_@431-562@..\src\qxk\qxk.c
+      13      2     74      1      20 QXK_current@565-584@..\src\qxk\qxk.c
+      16      4    113      2      25 QXMutex_init@87-111@..\src\qxk\qxk_mutex.c
+      71     12    544      2     113 QXMutex_lock@134-246@..\src\qxk\qxk_mutex.c
+      44     10    319      1      68 QXMutex_tryLock@269-336@..\src\qxk\qxk_mutex.c
+      67     16    506      1     115 QXMutex_unlock@358-472@..\src\qxk\qxk_mutex.c
+       8      1     49      3      10 QXSemaphore_init@79-88@..\src\qxk\qxk_sema.c
+      44      7    321      2      69 QXSemaphore_wait@114-182@..\src\qxk\qxk_sema.c
+      15      2     61      1      20 QXSemaphore_tryWait@199-218@..\src\qxk\qxk_sema.c
+      30      6    197      1      49 QXSemaphore_signal@240-288@..\src\qxk\qxk_sema.c
+      18      1    109      3      21 QXThread_ctor@113-133@..\src\qxk\qxk_xthr.c
+       8      2     38      3      11 QXThread_init_@140-150@..\src\qxk\qxk_xthr.c
+       8      2     38      3      11 QXThread_dispatch_@156-166@..\src\qxk\qxk_xthr.c
+      25      6    202      7      47 QXThread_start_@193-239@..\src\qxk\qxk_xthr.c
+      97     13    519      3     131 QXThread_post_@284-414@..\src\qxk\qxk_xthr.c
+       5      1     30      2       5 QXThread_postLIFO_@427-431@..\src\qxk\qxk_xthr.c
+      60      7    499      1      86 QXThread_queueGet@453-538@..\src\qxk\qxk_xthr.c
+       5      1     51      1       7 QXThread_block_@548-554@..\src\qxk\qxk_xthr.c
+       8      3     58      1       8 QXThread_unblock_@564-571@..\src\qxk\qxk_xthr.c
+      19      3    155      3      37 QXThread_teArm_@582-618@..\src\qxk\qxk_xthr.c
+      11      2     46      1      13 QXThread_teDisarm_@628-640@..\src\qxk\qxk_xthr.c
+      21      3    195      1      37 QXThread_delay@644-680@..\src\qxk\qxk_xthr.c
+      14      2     68      1      16 QXThread_delayCancel@684-699@..\src\qxk\qxk_xthr.c
+      15      2    108      1      25 QXK_threadRet_@712-736@..\src\qxk\qxk_xthr.c
+36 file analyzed.
+==============================================================
+NLOC    Avg.NLOC  AvgCCN  Avg.token  function_cnt    file
+--------------------------------------------------------------
+      5       0.0     0.0        0.0         0     ..\include\qassert.h
+    101       0.0     0.0        0.0         0     ..\include\qep.h
+     19       0.0     0.0        0.0         0     ..\include\qequeue.h
+     89       0.0     0.0        0.0         0     ..\include\qf.h
+     20       0.0     0.0        0.0         0     ..\include\qk.h
+     21       0.0     0.0        0.0         0     ..\include\qmpool.h
+      7       0.0     0.0        0.0         0     ..\include\qpc.h
+     10       0.0     0.0        0.0         0     ..\include\qpset.h
+    271       0.0     0.0        0.0         0     ..\include\qs.h
+      3       0.0     0.0        0.0         0     ..\include\qstamp.c
+      2       0.0     0.0        0.0         0     ..\include\qstamp.h
+      0       0.0     0.0        0.0         0     ..\include\qs_dummy.h
+      5       0.0     0.0        0.0         0     ..\include\qv.h
+     23       0.0     0.0        0.0         0     ..\include\qxk.h
+     32       0.0     0.0        0.0         0     ..\include\qxthread.h
+    331      38.5     6.1      231.6         8     ..\src\qf\qep_hsm.c
+    341      33.8     6.2      221.2         9     ..\src\qf\qep_msm.c
+     60      13.0     3.5       83.8         4     ..\src\qf\qf_act.c
+    267      26.8     3.8      160.0         9     ..\src\qf\qf_actq.c
+     66      19.7     2.0      110.0         3     ..\src\qf\qf_defer.c
+    126      16.7     2.7      105.9         7     ..\src\qf\qf_dyn.c
+    108      25.2     3.5      161.0         4     ..\src\qf\qf_mem.c
+    104      18.8     4.2      120.8         5     ..\src\qf\qf_ps.c
+     14      12.0     1.0       68.0         1     ..\src\qf\qf_qact.c
+    150      35.8     4.8      203.8         4     ..\src\qf\qf_qeq.c
+     14      12.0     1.0       76.0         1     ..\src\qf\qf_qmact.c
+    209      25.0     4.2      154.2         8     ..\src\qf\qf_time.c
+    182      19.2     4.2      107.8         9     ..\src\qk\qk.c
+     76      17.0     3.8       97.0         4     ..\src\qv\qv.c
+    248      23.8     4.6      142.6        10     ..\src\qxk\qxk.c
+    205      49.5    10.5      370.5         4     ..\src\qxk\qxk_mutex.c
+    104      24.2     4.0      157.0         4     ..\src\qxk\qxk_sema.c
+    341      22.4     3.4      151.1        14     ..\src\qxk\qxk_xthr.c
+     19       0.0     0.0        0.0         0     ..\src\qf_pkg.h
+     11       0.0     0.0        0.0         0     ..\src\qs_pkg.h
+     16       0.0     0.0        0.0         0     ..\src\qxk_pkg.h
+
+=========================================================================================================
+!!!! Warnings (cyclomatic_complexity > 20 or length > 500 or nloc > 1000000 or parameter_count > 10) !!!!
+================================================
+  NLOC    CCN   token  PARAM  length  location
+------------------------------------------------
+     122     23    845      2     185 QMsm_dispatch_@229-413@..\src\qf\qep_msm.c
+==========================================================================================
+Total nloc   Avg.NLOC  AvgCCN  Avg.token   Fun Cnt  Warning cnt   Fun Rt   nloc Rt
+------------------------------------------------------------------------------------------
+      3600      25.3     4.4      158.7      108            1      0.01    0.04
+@endcode
+*/

+ 9 - 8
ports/msp430/qk/qs_port.h

@@ -1,11 +1,11 @@
 /**
 * @file
-* @brief QS/C port to MSP430 CPUs
+* @brief QS/C port to MSP340 and MSP430X CPUs
 * @ingroup qs
 * @cond
 ******************************************************************************
-* Last Updated for Version: 6.9.0
-* Date of the Last Update:  2020-08-27
+* Last Updated for Version: 6.9.1
+* Date of the Last Update:  2020-10-03
 *
 *                    Q u a n t u m  L e a P s
 *                    ------------------------
@@ -50,13 +50,14 @@
 #define QS_FUN_PTR_SIZE  4U
 
 /*****************************************************************************
-* NOTE: QS might be used with or without other QP components, in which
-* case the separate definitions of the macros QF_CRIT_STAT_TYPE,
-* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured
-* to be used with the other QP component, by simply including "qf_port.h"
-* *before* "qs.h".
+* NOTE:
+* QS might be used with or without other QP components, in which case
+* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY,
+* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with
+* the other QP component, by simply including "qf_port.h" *before* "qs.h".
 */
 #include "qf_port.h" /* use QS with QF */
 #include "qs.h"      /* QS platform-independent public interface */
 
 #endif /* QS_PORT_H */
+

+ 13 - 15
ports/msp430/qutest/qs_port.h

@@ -1,11 +1,11 @@
 /**
 * @file
-* @brief QS/C port to a 16-bit CPU and a generic C compiler.
+* @brief QS/C port to MSP340 and MSP430X CPUs
 * @ingroup qs
 * @cond
 ******************************************************************************
-* Last updated for version 6.6.0
-* Last updated on  2019-10-14
+* Last Updated for Version: 6.9.1
+* Date of the Last Update:  2020-10-03
 *
 *                    Q u a n t u m  L e a P s
 *                    ------------------------
@@ -29,7 +29,7 @@
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
-* along with this program. If not, see <www.gnu.org/licenses>.
+* along with this program. If not, see <www.gnu.org/licenses/>.
 *
 * Contact information:
 * <www.state-machine.com/licensing>
@@ -41,25 +41,23 @@
 #define QS_PORT_H
 
 /* QS time-stamp size in bytes */
-#define QS_TIME_SIZE     2
+#define QS_TIME_SIZE     4U
 
 /* object pointer size in bytes */
-#define QS_OBJ_PTR_SIZE  2
+#define QS_OBJ_PTR_SIZE  4U
 
 /* function pointer size in bytes */
-#define QS_FUN_PTR_SIZE  4
-
-/* flush the QS output buffer after each QS record */
-#define QS_REC_DONE()  QS_onFlush()
+#define QS_FUN_PTR_SIZE  4U
 
 /*****************************************************************************
-* NOTE: QS might be used with or without other QP components, in which
-* case the separate definitions of the macros QF_CRIT_STAT_TYPE,
-* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured
-* to be used with the other QP component, by simply including "qf_port.h"
-* *before* "qs.h".
+* NOTE:
+* QS might be used with or without other QP components, in which case
+* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY,
+* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with
+* the other QP component, by simply including "qf_port.h" *before* "qs.h".
 */
 #include "qf_port.h" /* use QS with QF */
 #include "qs.h"      /* QS platform-independent public interface */
 
 #endif /* QS_PORT_H */
+

+ 9 - 8
ports/msp430/qv/qs_port.h

@@ -1,11 +1,11 @@
 /**
 * @file
-* @brief QS/C port to MSP430 CPUs
+* @brief QS/C port to MSP340 and MSP430X CPUs
 * @ingroup qs
 * @cond
 ******************************************************************************
-* Last Updated for Version: 6.9.0
-* Date of the Last Update:  2020-08-27
+* Last Updated for Version: 6.9.1
+* Date of the Last Update:  2020-10-03
 *
 *                    Q u a n t u m  L e a P s
 *                    ------------------------
@@ -50,13 +50,14 @@
 #define QS_FUN_PTR_SIZE  4U
 
 /*****************************************************************************
-* NOTE: QS might be used with or without other QP components, in which
-* case the separate definitions of the macros QF_CRIT_STAT_TYPE,
-* QF_CRIT_ENTRY, and QF_CRIT_EXIT are needed. In this port QS is configured
-* to be used with the other QP component, by simply including "qf_port.h"
-* *before* "qs.h".
+* NOTE:
+* QS might be used with or without other QP components, in which case
+* the separate definitions of the macros QF_CRIT_STAT_TYPE, QF_CRIT_ENTRY,
+* and QF_CRIT_EXIT are needed. In this port QS is configured to be used with
+* the other QP component, by simply including "qf_port.h" *before* "qs.h".
 */
 #include "qf_port.h" /* use QS with QF */
 #include "qs.h"      /* QS platform-independent public interface */
 
 #endif /* QS_PORT_H */
+

+ 5 - 4
ports/posix-qv/qf_port.c

@@ -5,7 +5,7 @@
 * @cond
 ******************************************************************************
 * Last updated for version 6.9.1
-* Last updated on  2020-09-18
+* Last updated on  2020-10-03
 *
 *                    Q u a n t u m  L e a P s
 *                    ------------------------
@@ -163,7 +163,7 @@ int_t QF_run(void) {
     QF_CRIT_E_();
 
     /* produce the QS_QF_RUN trace record */
-    QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, (void *)0, (void *)0)
+    QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, 0U)
     QS_END_NOCRIT_PRE_()
 
     while (l_isRunning) {
@@ -190,7 +190,7 @@ int_t QF_run(void) {
             * 3. determine if event is garbage and collect it if so
             */
             e = QActive_get_(a);
-            QHSM_DISPATCH(&a->super, e);
+            QHSM_DISPATCH(&a->super, e, a->prio);
             QF_gc(e);
 
             QF_CRIT_E_();
@@ -285,7 +285,8 @@ void QActive_start_(QActive * const me, uint_fast8_t prio,
     me->prio = (uint8_t)prio;
     QF_add_(me); /* make QF aware of this active object */
 
-    QHSM_INIT(&me->super, par); /* the top-most initial tran. (virtual) */
+    /* the top-most initial tran. (virtual) */
+    QHSM_INIT(&me->super, par, me->prio);
     QS_FLUSH(); /* flush the trace buffer to the host */
 }
 /*..........................................................................*/

+ 5 - 5
ports/posix-qv/qs_port.c

@@ -4,14 +4,14 @@
 * @ingroup ports
 * @cond
 ******************************************************************************
-* Last updated for version 6.8.0
-* Last updated on  2020-03-31
+* Last updated for version 6.9.1
+* Last updated on  2020-10-03
 *
 *                    Q u a n t u m  L e a P s
 *                    ------------------------
 *                    Modern Embedded Software
 *
-* Copyright (C) 2005-2019 Quantum Leaps, LLC. All rights reserved.
+* Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
 *
 * This program is open source software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as published
@@ -196,7 +196,7 @@ void QS_onFlush(void) {
     QS_CRIT_STAT_
 
     if (l_sock == INVALID_SOCKET) { /* socket NOT initialized? */
-        FPRINTF_S(stderr, "<TARGET> ERROR   invalid TCP socket\n");
+        FPRINTF_S(stderr, "<TARGET> ERROR   %s\n", "invalid TCP socket");
         return;
     }
 
@@ -253,7 +253,7 @@ void QS_output(void) {
     QS_CRIT_STAT_
 
     if (l_sock == INVALID_SOCKET) { /* socket NOT initialized? */
-        FPRINTF_S(stderr, "<TARGET> ERROR   invalid TCP socket\n");
+        FPRINTF_S(stderr, "<TARGET> ERROR   %s\n", "invalid TCP socket");
         return;
     }
 

+ 5 - 4
ports/posix/qf_port.c

@@ -5,7 +5,7 @@
 * @cond
 ******************************************************************************
 * Last updated for version 6.9.1
-* Last updated on  2020-09-18
+* Last updated on  2020-10-03
 *
 *                    Q u a n t u m  L e a P s
 *                    ------------------------
@@ -121,7 +121,7 @@ int_t QF_run(void) {
     QF_onStartup();  /* invoke startup callback */
 
     /* produce the QS_QF_RUN trace record */
-    QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, (void *)0, (void *)0)
+    QS_BEGIN_NOCRIT_PRE_(QS_QF_RUN, 0U)
     QS_END_NOCRIT_PRE_()
 
     /* try to set the priority of the ticker thread, see NOTE01 */
@@ -206,7 +206,7 @@ static void *thread_routine(void *arg) { /* the expected POSIX signature */
 #endif
     {
         QEvt const *e = QActive_get_(act); /* wait for the event */
-        QHSM_DISPATCH(&act->super, e);     /* dispatch to the HSM */
+        QHSM_DISPATCH(&act->super, e, act->prio); /* dispatch to the HSM */
         QF_gc(e); /* check if the event is garbage, and collect it if so */
     }
 #ifdef QF_ACTIVE_STOP
@@ -235,7 +235,8 @@ void QActive_start_(QActive * const me, uint_fast8_t prio,
     me->prio = (uint8_t)prio;
     QF_add_(me); /* make QF aware of this active object */
 
-    QHSM_INIT(&me->super, par); /* the top-most initial tran. (virtual) */
+    /* the top-most initial tran. (virtual) */
+    QHSM_INIT(&me->super, par, me->prio);
     QS_FLUSH(); /* flush the trace buffer to the host */
 
     pthread_attr_init(&attr);