Skip to content

Commit 7ad3fa7

Browse files
committed
7.1.0
1 parent ff0b5a3 commit 7ad3fa7

File tree

10 files changed

+52
-42
lines changed

10 files changed

+52
-42
lines changed

doxygen/metrics.dox

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
9 3 59 1 12 QF_getPoolMin@105-116@..\src\qf\qf_dyn.c
5656
39 7 234 3 57 QF_newX_@119-175@..\src\qf\qf_dyn.c
5757
30 4 192 1 46 QF_gc@178-223@..\src\qf\qf_dyn.c
58-
19 2 94 2 26 QF_newRef_@226-251@..\src\qf\qf_dyn.c
59-
11 1 67 1 13 QF_deleteRef_@254-266@..\src\qf\qf_dyn.c
58+
20 2 99 2 28 QF_newRef_@226-253@..\src\qf\qf_dyn.c
59+
11 1 67 1 13 QF_deleteRef_@256-268@..\src\qf\qf_dyn.c
6060
32 5 233 4 50 QMPool_init@67-116@..\src\qf\qf_mem.c
6161
44 4 238 3 67 QMPool_get@119-185@..\src\qf\qf_mem.c
6262
19 2 114 3 26 QMPool_put@188-213@..\src\qf\qf_mem.c
@@ -67,9 +67,9 @@
6767
19 5 130 1 24 QActive_unsubscribeAll@223-246@..\src\qf\qf_ps.c
6868
10 2 46 2 10 QF_bzero@84-93@..\src\qf\qf_qact.c
6969
16 2 72 2 23 QActive_ctor@100-122@..\src\qf\qf_qact.c
70-
29 9 211 1 40 QActive_register_@127-166@..\src\qf\qf_qact.c
71-
10 3 79 1 15 QActive_unregister_@171-185@..\src\qf\qf_qact.c
72-
24 6 143 1 29 QF_LOG2@193-221@..\src\qf\qf_qact.c
70+
29 9 211 1 44 QActive_register_@127-170@..\src\qf\qf_qact.c
71+
10 3 79 1 15 QActive_unregister_@175-189@..\src\qf\qf_qact.c
72+
24 6 143 1 29 QF_LOG2@197-225@..\src\qf\qf_qact.c
7373
14 2 85 3 14 QEQueue_init@67-80@..\src\qf\qf_qeq.c
7474
57 8 301 4 76 QEQueue_post@83-158@..\src\qf\qf_qeq.c
7575
36 5 199 3 46 QEQueue_postLIFO@161-206@..\src\qf\qf_qeq.c
@@ -88,31 +88,31 @@
8888
12 2 87 1 18 QF_init@144-161@..\src\qk\qk.c
8989
3 1 10 1 4 QF_stop@164-167@..\src\qk\qk.c
9090
15 4 61 1 25 QF_run@170-194@..\src\qk\qk.c
91-
23 3 151 7 32 QActive_start_@201-232@..\src\qk\qk.c
92-
15 3 79 1 19 QK_sched_@237-255@..\src\qk\qk.c
93-
63 15 374 1 108 QK_activate_@258-365@..\src\qk\qk.c
91+
25 3 156 7 34 QActive_start_@201-234@..\src\qk\qk.c
92+
15 3 79 1 19 QK_sched_@239-257@..\src\qk\qk.c
93+
63 15 374 1 108 QK_activate_@260-367@..\src\qk\qk.c
9494
9 2 64 1 13 QF_init@73-85@..\src\qv\qv.c
9595
3 1 10 1 4 QF_stop@88-91@..\src\qv\qv.c
9696
39 9 197 1 76 QF_run@94-169@..\src\qv\qv.c
97-
17 1 119 7 24 QActive_start_@176-199@..\src\qv\qv.c
97+
18 1 124 7 25 QActive_start_@176-200@..\src\qv\qv.c
9898
23 3 131 1 34 QXK_schedLock@71-104@..\src\qxk\qxk.c
9999
20 4 118 1 33 QXK_schedUnlock@107-139@..\src\qxk\qxk.c
100100
14 2 116 1 22 QF_init@144-165@..\src\qxk\qxk.c
101101
3 1 10 1 4 QF_stop@168-171@..\src\qxk\qxk.c
102102
15 4 61 1 25 QF_run@174-198@..\src\qxk\qxk.c
103-
25 4 162 7 35 QActive_start_@205-239@..\src\qxk\qxk.c
104-
79 16 497 1 135 QXK_activate_@247-381@..\src\qxk\qxk.c
105-
57 9 318 1 76 QXK_sched_@384-459@..\src\qxk\qxk.c
106-
12 2 72 1 18 QXK_current@462-479@..\src\qxk\qxk.c
107-
13 2 104 1 23 QXK_threadExit_@485-507@..\src\qxk\qxk.c
103+
26 3 166 7 37 QActive_start_@205-241@..\src\qxk\qxk.c
104+
79 16 497 1 135 QXK_activate_@249-383@..\src\qxk\qxk.c
105+
57 9 318 1 76 QXK_sched_@386-461@..\src\qxk\qxk.c
106+
12 2 72 1 18 QXK_current@464-481@..\src\qxk\qxk.c
107+
13 2 104 1 23 QXK_threadExit_@487-509@..\src\qxk\qxk.c
108108
10 2 74 2 12 QXMutex_init@74-85@..\src\qxk\qxk_mutex.c
109109
81 11 724 2 138 QXMutex_lock@88-225@..\src\qxk\qxk_mutex.c
110110
59 9 502 1 97 QXMutex_tryLock@228-324@..\src\qxk\qxk_mutex.c
111111
78 12 670 1 135 QXMutex_unlock@327-461@..\src\qxk\qxk_mutex.c
112112
9 1 51 3 11 QXSemaphore_init@73-83@..\src\qxk\qxk_sema.c
113-
57 7 389 2 85 QXSemaphore_wait@86-170@..\src\qxk\qxk_sema.c
114-
28 3 139 1 39 QXSemaphore_tryWait@173-211@..\src\qxk\qxk_sema.c
115-
42 7 275 1 66 QXSemaphore_signal@214-279@..\src\qxk\qxk_sema.c
113+
57 7 389 2 84 QXSemaphore_wait@86-169@..\src\qxk\qxk_sema.c
114+
28 3 139 1 39 QXSemaphore_tryWait@172-210@..\src\qxk\qxk_sema.c
115+
42 7 275 1 66 QXSemaphore_signal@213-278@..\src\qxk\qxk_sema.c
116116
21 2 113 3 26 QXThread_ctor@74-99@..\src\qxk\qxk_xthr.c
117117
21 4 195 1 38 QXThread_delay@102-139@..\src\qxk\qxk_xthr.c
118118
14 2 68 1 16 QXThread_delayCancel@142-157@..\src\qxk\qxk_xthr.c
@@ -150,16 +150,16 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file
150150
2 0.0 0.0 0.0 0 ..\src\qf\qf_act.c
151151
258 27.9 3.7 154.7 9 ..\src\qf\qf_actq.c
152152
69 20.7 2.0 107.0 3 ..\src\qf\qf_defer.c
153-
135 18.3 3.0 111.3 7 ..\src\qf\qf_dyn.c
153+
136 18.4 3.0 112.0 7 ..\src\qf\qf_dyn.c
154154
102 31.7 3.7 195.0 3 ..\src\qf\qf_mem.c
155155
115 21.2 4.2 123.8 5 ..\src\qf\qf_ps.c
156156
98 17.8 4.4 110.2 5 ..\src\qf\qf_qact.c
157157
152 36.2 4.8 201.0 4 ..\src\qf\qf_qeq.c
158158
18 16.0 2.0 79.0 1 ..\src\qf\qf_qmact.c
159159
218 26.2 4.1 156.0 8 ..\src\qf\qf_time.c
160-
181 21.6 4.2 124.0 8 ..\src\qk\qk.c
161-
75 17.0 3.2 97.5 4 ..\src\qv\qv.c
162-
269 26.1 4.7 158.9 10 ..\src\qxk\qxk.c
160+
183 21.9 4.2 124.6 8 ..\src\qk\qk.c
161+
76 17.2 3.2 98.8 4 ..\src\qv\qv.c
162+
270 26.2 4.6 159.3 10 ..\src\qxk\qxk.c
163163
235 57.0 8.5 492.5 4 ..\src\qxk\qxk_mutex.c
164164
143 34.0 4.5 213.5 4 ..\src\qxk\qxk_sema.c
165165
324 24.3 3.5 155.8 13 ..\src\qxk\qxk_xthr.c
@@ -169,6 +169,6 @@ No thresholds exceeded (cyclomatic_complexity > 20 or length > 500 or nloc > 100
169169
==========================================================================================
170170
Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt
171171
------------------------------------------------------------------------------------------
172-
3998 24.9 4.1 153.4 121 0 0.00 0.00
172+
4003 24.9 4.1 153.5 121 0 0.00 0.00
173173
@endcode
174174
*/

ports/embos/qf_port.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
============================================================================*/
2525
/*!
26-
* @date Last updated on: 2022-08-19
26+
* @date Last updated on: 2022-08-29
2727
* @version Last updated for: @ref qpc_7_1_0
2828
*
2929
* @file
@@ -110,7 +110,8 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
110110
(OS_UINT)qLen,
111111
(void *)&qSto[0]);
112112

113-
me->prio = (uint8_t)(prioSpec & 0xFFU);
113+
me->prio = (uint8_t)(prioSpec & 0xFFU); /* QF-priority of the AO */
114+
me->pthre = (uint8_t)(prioSpec >> 8U); /* preemption-threshold */
114115
QActive_register_(me); /* register this AO */
115116

116117
QHSM_INIT(&me->super, par, me->prio); /* the top-most initial tran. */
@@ -123,7 +124,7 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
123124
#elif
124125
"AO", /* a generic AO task name */
125126
#endif
126-
(OS_PRIO)prio, /* embOS uses the same numbering as QP */
127+
(OS_PRIO)me->prio,/* embOS uses the same numbering as QP*/
127128
&thread_function,
128129
(void OS_STACKPTR *)stkSto,
129130
(OS_UINT)stkSize,

ports/esp-idf/qf_port.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
============================================================================*/
2525
/*!
26-
* @date Last updated on: 2022-98-23
26+
* @date Last updated on: 2022-08-29
2727
* @version Last updated for: @ref qpc_7_1_0
2828
*
2929
* @file
@@ -140,7 +140,8 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
140140
&me->osObject); /* static queue buffer */
141141
Q_ASSERT_ID(210, me->eQueue != (QueueHandle_t)0);
142142

143-
me->prio = (uint8_t)(prioSpec & 0xFFU);
143+
me->prio = (uint8_t)(prioSpec & 0xFFU); /* QF-priority of the AO */
144+
me->pthre = (uint8_t)(prioSpec >> 8U); /* preemption-threshold */
144145
QActive_register_(me); /* register this AO */
145146

146147
QHSM_INIT(&me->super, par, me->prio); /* the top-most initial tran. */

ports/freertos/qf_port.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
128128
&me->osObject); /* static queue buffer */
129129
Q_ASSERT_ID(210, me->eQueue != (QueueHandle_t)0);
130130

131-
me->prio = (uint8_t)(prioSpec & 0xFFU);
131+
me->prio = (uint8_t)(prioSpec & 0xFFU); /* QF-priority of the AO */
132+
me->pthre = (uint8_t)(prioSpec >> 8U); /* preemption-threshold */
132133
QActive_register_(me); /* register this AO */
133134

134135
QHSM_INIT(&me->super, par, me->prio); /* the top-most initial tran. */
@@ -146,7 +147,7 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
146147
taskName , /* the name of the task */
147148
stkSize/sizeof(portSTACK_TYPE), /* stack length */
148149
(void *)me, /* the 'pvParameters' parameter */
149-
FREERTOS_TASK_PRIO(me->prio), /* also FreeRTOS priority */
150+
FREERTOS_TASK_PRIO(me->prio), /* FreeRTOS priority */
150151
(StackType_t *)stkSto, /* stack storage */
151152
&me->thread)); /* task buffer */
152153
}

ports/posix-qv/qf_port.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
============================================================================*/
2525
/*!
26-
* @date Last updated on: 2022-08-19
26+
* @date Last updated on: 2022-08-29
2727
* @version Last updated for: @ref qpc_7_1_0
2828
*
2929
* @file
@@ -269,7 +269,8 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
269269
Q_REQUIRE_ID(600, (stkSto == (void *)0));
270270
QEQueue_init(&me->eQueue, qSto, qLen);
271271

272-
me->prio = (uint8_t)(prioSpec & 0xFFU);
272+
me->prio = (uint8_t)(prioSpec & 0xFFU); /* QF-priority of the AO */
273+
me->pthre = (uint8_t)(prioSpec >> 8U); /* preemption-threshold */
273274
QActive_register_(me); /* register this AO */
274275

275276
/* the top-most initial tran. (virtual) */

ports/posix/qf_port.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
============================================================================*/
2525
/*!
26-
* @date Last updated on: 2022-08-19
26+
* @date Last updated on: 2022-08-29
2727
* @version Last updated for: @ref qpc_7_1_0
2828
*
2929
* @file
@@ -226,7 +226,8 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
226226
QEQueue_init(&me->eQueue, qSto, qLen);
227227
pthread_cond_init(&me->osObject, NULL);
228228

229-
me->prio = (uint8_t)(prioSpec & 0xFFU);
229+
me->prio = (uint8_t)(prioSpec & 0xFFU); /* QF-priority of the AO */
230+
me->pthre = (uint8_t)(prioSpec >> 8U); /* preemption-threshold */
230231
QActive_register_(me); /* register this AO */
231232

232233
/* the top-most initial tran. (virtual) */
@@ -243,7 +244,7 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
243244
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
244245

245246
/* priority of the p-thread, see NOTE04 */
246-
param.sched_priority = prio
247+
param.sched_priority = me->prio
247248
+ (sched_get_priority_max(SCHED_FIFO)
248249
- QF_MAX_ACTIVE - 3U);
249250
pthread_attr_setschedparam(&attr, &param);

ports/uc-os2/qf_port.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
============================================================================*/
2525
/*!
26-
* @date Last updated on: 2022-08-19
26+
* @date Last updated on: 2022-08-29
2727
* @version Last updated for: @ref qpc_7_1_0
2828
*
2929
* @file
@@ -81,7 +81,8 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
8181
/* the uC-OS2 queue must be created correctly */
8282
Q_ASSERT_ID(210, me->eQueue != (OS_EVENT *)0);
8383

84-
me->prio = (uint8_t)(prioSpec & 0xFFU);
84+
me->prio = (uint8_t)(prioSpec & 0xFFU); /* QF-priority of the AO */
85+
me->pthre = (uint8_t)(prioSpec >> 8U); /* preemption-threshold */
8586
QActive_register_(me); /* register this AO */
8687

8788
QHSM_INIT(&me->super, par, me->prio); /* initial tran. (virtual) */

ports/win32-qv/qf_port.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
============================================================================*/
2525
/*!
26-
* @date Last updated on: 2022-08-25
26+
* @date Last updated on: 2022-08-29
2727
* @version Last updated for: @ref qpc_7_1_0
2828
*
2929
* @file
@@ -184,7 +184,8 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
184184
/* no per-AO stack needed for this port */
185185
Q_REQUIRE_ID(600, stkSto == (void *)0);
186186

187-
me->prio = (uint8_t)(prioSpec & 0xFFU);
187+
me->prio = (uint8_t)(prioSpec & 0xFFU); /* QF-priority of the AO */
188+
me->pthre = (uint8_t)(prioSpec >> 8U); /* preemption-threshold */
188189
QActive_register_(me); /* register this AO */
189190

190191
QEQueue_init(&me->eQueue, qSto, qLen);

ports/win32/qf_port.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
============================================================================*/
2525
/*!
26-
* @date Last updated on: 2022-08-19
26+
* @date Last updated on: 2022-08-29
2727
* @version Last updated for: @ref qpc_7_1_0
2828
*
2929
* @file
@@ -140,7 +140,9 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
140140
{
141141
/* no external AO-stack storage needed for this port */
142142
Q_REQUIRE_ID(800, stkSto == (void *)0);
143-
me->prio = (uint8_t)(prioSpec & 0xFFU);
143+
144+
me->prio = (uint8_t)(prioSpec & 0xFFU); /* QF-priority of the AO */
145+
me->pthre = (uint8_t)(prioSpec >> 8U); /* preemption-threshold */
144146
QActive_register_(me); /* register this AO */
145147

146148
QEQueue_init(&me->eQueue, qSto, qLen);

zephyr/qf_port.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
109109
void * const stkSto, uint_fast16_t const stkSize,
110110
void const * const par)
111111
{
112-
me->prio = (uint8_t)(prioSpec & 0xFFU);
112+
me->prio = (uint8_t)(prioSpec & 0xFFU); /* QF-priority of the AO */
113+
me->pthre = (uint8_t)(prioSpec >> 8U); /* preemption-threshold */
113114
QActive_register_(me); /* register this AO */
114115

115116
/* initialize the Zephyr message queue */
@@ -119,7 +120,7 @@ void QActive_start_(QActive * const me, QPrioSpec const prioSpec,
119120
QS_FLUSH(); /* flush the trace buffer to the host */
120121

121122
/* Zephyr uses the reverse priority numbering than QP */
122-
int zprio = (int)QF_MAX_ACTIVE - (int)prio;
123+
int zprio = (int)QF_MAX_ACTIVE - (int)me->prio;
123124

124125
/* extract data temporarily saved in me->thread by QActive_setAttr() */
125126
uint32_t opt = me->thread.base.order_key;

0 commit comments

Comments
 (0)