Skip to content

Commit 3c0662c

Browse files
committed
8.1.1
1 parent 6815f05 commit 3c0662c

File tree

9 files changed

+33
-50
lines changed

9 files changed

+33
-50
lines changed

include/qp.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
#define QP_H_
3131

3232
//============================================================================
33-
#define QP_VERSION_STR "8.1.0"
34-
#define QP_VERSION 810U
35-
// <VER>=810 <DATE>=250930
36-
#define QP_RELEASE 0x6A6F1BB5U
33+
#define QP_VERSION_STR "8.1.1"
34+
#define QP_VERSION 811U
35+
// <VER>=810 <DATE>=251008
36+
#define QP_RELEASE 0x6A6334D4U
3737

3838
//----------------------------------------------------------------------------
3939
// default configuration settings
@@ -211,9 +211,7 @@ struct QAsmVtable {
211211
void (*dispatch)(QAsm * const me, QEvt const * const e,
212212
uint_fast8_t const qsId);
213213
bool (*isIn)(QAsm * const me, QStateHandler const stateHndl);
214-
#ifdef Q_SPY
215214
QStateHandler (*getStateHandler)(QAsm const * const me);
216-
#endif // Q_SPY
217215
};
218216

219217
#ifdef Q_SPY
@@ -230,6 +228,9 @@ struct QAsmVtable {
230228
(*((QAsm *)(me_))->vptr->dispatch)((QAsm *)(me_), (e_), 0U)
231229
#endif // ndef Q_SPY
232230

231+
#define QASM_GET_STATE_HANDLER(me_) \
232+
(*((QAsm *)(me_))->vptr->getStateHandler)((QAsm *)(me_))
233+
233234
#define Q_ASM_UPCAST(ptr_) ((QAsm *)(ptr_))
234235

235236
//----------------------------------------------------------------------------
@@ -258,10 +259,8 @@ bool QHsm_isIn_(
258259
QAsm * const me,
259260
QStateHandler const stateHndl);
260261

261-
#ifdef Q_SPY
262262
//! @private @memberof QHsm
263263
QStateHandler QHsm_getStateHandler_(QAsm const * const me);
264-
#endif // def Q_SPY
265264

266265
//! @protected @memberof QHsm
267266
QState QHsm_top(QHsm const * const me,
@@ -316,10 +315,8 @@ bool QMsm_isIn_(
316315
QAsm * const me,
317316
QStateHandler const stateHndl);
318317

319-
#ifdef Q_SPY
320-
//! @public @memberof QMsm
318+
//! @private @memberof QMsm
321319
QStateHandler QMsm_getStateHandler_(QAsm const * const me);
322-
#endif // def Q_SPY
323320

324321
//! @public @memberof QMsm
325322
QMState const * QMsm_topQMState(void);

qpc_8.1.0.sha1 renamed to qpc_8.1.1.sha1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
30586f7f01a5bd978c0892f409b0542badbbf7ca *include/qequeue.h
22
bd63f14424e83d23278e3de89a18b50d77bbc2f7 *include/qk.h
33
58d7d73db5b4cef3e86dccd72172f28eb64b4a06 *include/qmpool.h
4-
526688b573ce2ea503200261b45e123e9918b00c *include/qp.h
4+
18b58801789db2abaa5aacbe262333f28b2a4667 *include/qp.h
55
e6f3ababd17825a6bbdd9e657ec4c82b82f66fcd *include/qp_pkg.h
66
7dbe3b848bad7bbdca50c00d498e7d1f72ade135 *include/qpc.h
77
326d1f7bb5f4b00f256165afac1dbc6e5ebd46f1 *include/qs.h
@@ -13,17 +13,17 @@ f818617a4860bc194926a34a1611997dd7a1cfc2 *include/qv.h
1313
22fc043da8188d60e8cd582c4a71559ab9231b4e *include/qxk.h
1414
ea47fe108c83fd74c15db9d30729fccbc4a63277 *include/README.md
1515
7f54a0933a9dc2fcaca475919fa0067667ed99ed *src/qf/CMakeLists.txt
16-
3c4c555d53aceb0ec5213e1b8b1ee2b8ad2a63d7 *src/qf/qep_hsm.c
17-
46332e4a849d85ef4033860ac284723e850d24ec *src/qf/qep_msm.c
16+
cafa3462a51cf1eb4e483495cc672b38bd295f37 *src/qf/qep_hsm.c
17+
f4459b1e1156d80aa6c88810ebd7d87847753232 *src/qf/qep_msm.c
1818
9040750e4f99836661986a78a6a97f6fc3a0f26b *src/qf/qf_act.c
19-
93601569ee66aa1a8b39d791c8335f5ba73adb5b *src/qf/qf_actq.c
19+
01464c17fc74513591842e72fe6cd404180c03f2 *src/qf/qf_actq.c
2020
72ed0e6cc2f6ba2e2b7cb6343d43627a370e3830 *src/qf/qf_defer.c
2121
fed2215fc3ff1f271dd990b83498c756b63d5a8c *src/qf/qf_dyn.c
2222
e45285663a81ac93b639afd0744fa2e70287af6f *src/qf/qf_mem.c
2323
47cbf4a5a1f5cffe0128ff465c2467af1d634ddf *src/qf/qf_ps.c
24-
2a41f266f7fb60e2deda4779e884c25a8d566e07 *src/qf/qf_qact.c
24+
06c61ddfbe0afe419f88df7541c329b840db5c56 *src/qf/qf_qact.c
2525
fcfe58aadf24419f89eb0ebe685e6b6b86f2a79b *src/qf/qf_qeq.c
26-
8489d0055800cba557f0237d00e1bd3fb1063396 *src/qf/qf_qmact.c
26+
8f5b2a0ed1cb810dabcd80d1b4b06d2a9e850cd1 *src/qf/qf_qmact.c
2727
64022ced25d11d7dccde974a6d1fa7fd789a9326 *src/qf/qf_time.c
2828
878a737efe234f40dc8c9374acc351e510b4da1e *src/qk/CMakeLists.txt
2929
c8ac24ddfe457c52a8d9b27b6ae999bb503194b3 *src/qk/qk.c
@@ -33,7 +33,7 @@ b9682b2e5c73987ac777f10db5dd6a6fee2e59fd *src/qs/qs_64bit.c
3333
8a96a1a0c2072cdbd49326893fdd7951e075c39e *src/qs/qs_fp.c
3434
a40aeed969ce2a05c64da01df6a0f77fbf3457f4 *src/qs/qs_rx.c
3535
d1dd4fc7efd0c7ef0fc85107a00dc822cb82bf44 *src/qs/qstamp.c
36-
d5d6c4c69ebc05a309e21f3122cc6715d3bc566e *src/qs/qutest.c
36+
06b0029c55b9c90779ecadb6f6471a958f0b31a8 *src/qs/qutest.c
3737
b1d2def9b8f6cde464170af7682ab0f01f4f40f6 *src/qv/CMakeLists.txt
3838
77d7e5755081399426ae4b2f6df56c7c378ab8b9 *src/qv/qv.c
3939
f0015a5bb9bef698dd7438d1da6172ef9f5feece *src/qxk/qxk.c

sha1.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@setlocal
22

3-
set FNAME=qpc_8.1.0.sha1
3+
set FNAME=qpc_8.1.1.sha1
44

55
:: usage
66
@echo Usage: sha1 [gen]

src/qf/qep_hsm.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,8 @@ void QHsm_ctor(QHsm * const me,
163163
static struct QAsmVtable const vtable = { // QAsm virtual table
164164
&QHsm_init_,
165165
&QHsm_dispatch_,
166-
&QHsm_isIn_
167-
#ifdef Q_SPY
168-
,&QHsm_getStateHandler_
169-
#endif
166+
&QHsm_isIn_,
167+
&QHsm_getStateHandler_
170168
};
171169
// no need to call the superclass' constructor QAsm_ctor() here
172170
me->super.vptr = &vtable; // QHsm class' VTABLE
@@ -284,7 +282,6 @@ void QHsm_dispatch_(QAsm * const me,
284282

285283
// process the event hierarchically...
286284
QStateHandler path[QHSM_MAX_NEST_DEPTH_]; // entry path array
287-
path[0] = s; // save current state
288285
me->temp.fun = s;
289286
QState r; // state handler return value
290287
int_fast8_t ip = QHSM_MAX_NEST_DEPTH_; // path index & fixed loop bound
@@ -307,7 +304,10 @@ void QHsm_dispatch_(QAsm * const me,
307304
}
308305
} while (r == Q_RET_SUPER); // loop as long as superstate returned
309306

310-
if (r == Q_RET_HANDLED) { // did the last handler handle event e?
307+
if (r == Q_RET_IGNORED) { // was event e ignored?
308+
QS_TRAN0_(QS_QEP_IGNORED, me->state.fun); // output QS record
309+
}
310+
else if (r == Q_RET_HANDLED) { // did the last handler handle event e?
311311
QS_TRAN0_(QS_QEP_INTERN_TRAN, s); // output QS record
312312
}
313313
else if ((r == Q_RET_TRAN) || (r == Q_RET_TRAN_HIST)) { // tran. taken?
@@ -340,15 +340,13 @@ void QHsm_dispatch_(QAsm * const me,
340340
// enter the target (possibly recursively) by initial trans.
341341
QHsm_enter_target_(me, &path[0], ip, qsId);
342342
QS_TRAN_END_(QS_QEP_TRAN, s, path[0]); // output QS record
343-
}
344-
else if (r == Q_RET_IGNORED) { // was event e ignored?
345-
QS_TRAN0_(QS_QEP_IGNORED, me->state.fun); // output QS record
343+
344+
me->state.fun = path[0]; // change the current active state
346345
}
347346
else {
348347
Q_ERROR_LOCAL(360); // last state handler returned impossible value
349348
}
350349

351-
me->state.fun = path[0]; // change the current active state
352350
#ifndef Q_UNSAFE
353351
// establish stable state configuration
354352
me->temp.uint = QP_DIS_UPDATE(uintptr_t, me->state.uint);
@@ -644,11 +642,9 @@ QStateHandler QHsm_state(QHsm const * const me) {
644642
}
645643

646644
//............................................................................
647-
#ifdef Q_SPY
648645
//! @private @memberof QHsm
649646
QStateHandler QHsm_getStateHandler_(QAsm const * const me) {
650647
// NOTE: this function does NOT apply critical section, so it can
651648
// be safely called from an already established critical section.
652649
return me->state.fun;
653650
}
654-
#endif // def Q_SPY

src/qf/qep_msm.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,8 @@ void QMsm_ctor(QMsm * const me,
142142
static struct QAsmVtable const vtable = { // QAsm virtual table
143143
&QMsm_init_,
144144
&QMsm_dispatch_,
145-
&QMsm_isIn_
146-
#ifdef Q_SPY
147-
,&QMsm_getStateHandler_
148-
#endif
145+
&QMsm_isIn_,
146+
&QMsm_getStateHandler_
149147
};
150148
// no need to call the superclass' constructor QAsm_ctor() here
151149
me->super.vptr = &vtable; // QMsm class' VTABLE
@@ -471,10 +469,8 @@ QMState const* QMsm_stateObj(QMsm const* const me) {
471469
return me->super.state.obj;
472470
}
473471
//............................................................................
474-
#ifdef Q_SPY
475472
//! @public @memberof QMsm
476473
QStateHandler QMsm_getStateHandler_(QAsm const * const me) {
477474
// return the current state handler (function pointer)
478475
return me->state.obj->stateHandler;
479476
}
480-
#endif

src/qf/qf_actq.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,8 @@ void QTicker_ctor(QTicker * const me,
406406
static struct QAsmVtable const vtable = { // QTicker virtual table
407407
&QTicker_init_,
408408
&QTicker_dispatch_,
409-
&QHsm_isIn_
410-
#ifdef Q_SPY
411-
,&QHsm_getStateHandler_
412-
#endif
409+
&QHsm_isIn_,
410+
&QHsm_getStateHandler_
413411
};
414412
me->super.super.vptr = &vtable; // hook the vptr
415413

src/qf/qf_qact.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ void QActive_ctor(QActive * const me,
6161
static struct QAsmVtable const vtable = { // QActive virtual table
6262
&QHsm_init_,
6363
&QHsm_dispatch_,
64-
&QHsm_isIn_
65-
#ifdef Q_SPY
66-
,&QHsm_getStateHandler_
67-
#endif
64+
&QHsm_isIn_,
65+
&QHsm_getStateHandler_
6866
};
6967
me->super.vptr = &vtable; // hook vptr to QActive vtable
7068
}

src/qf/qf_qmact.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ void QMActive_ctor(QMActive * const me,
5555
static struct QAsmVtable const vtable = { // QMActive virtual table
5656
&QMsm_init_,
5757
&QMsm_dispatch_,
58-
&QMsm_isIn_
59-
#ifdef Q_SPY
60-
,&QMsm_getStateHandler_
61-
#endif
58+
&QMsm_isIn_,
59+
&QMsm_getStateHandler_
6260
};
6361
me->super.super.vptr = &vtable; // hook vptr to QMActive vtable
6462
}

0 commit comments

Comments
 (0)