Skip to content

Commit 6cbb42c

Browse files
committed
8.0.4
1 parent 2ddb8e3 commit 6cbb42c

File tree

31 files changed

+627
-605
lines changed

31 files changed

+627
-605
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ src/qxk/qxk.c
4949
src/qxk/qxk_mutex.c
5050
src/qxk/qxk_sema.c
5151
src/qxk/qxk_xthr.c
52+
zephyr/qutest_port.c
5253

5354
ports/arm-cm/qxk/
5455
ports/arm-cm/qutest/

examples

Submodule examples updated 139 files

include/qk.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ typedef uint_fast8_t QSchedStatus;
4242
//============================================================================
4343
//! @class QK_Attr
4444
typedef struct {
45-
QPSet readySet; //!< @memberof QK_Attr
46-
uint_fast8_t actPrio; //!< @memberof QK_Attr
47-
uint_fast8_t nextPrio; //!< @memberof QK_Attr
48-
uint_fast8_t actThre; //!< @memberof QK_Attr
49-
uint_fast8_t lockCeil; //!< @memberof QK_Attr
50-
uint_fast8_t intNest; //!< @memberof QK_Attr
45+
QPSet readySet; //!< @memberof QK_Attr
46+
uint8_t actPrio; //!< @memberof QK_Attr
47+
uint8_t nextPrio; //!< @memberof QK_Attr
48+
uint8_t actThre; //!< @memberof QK_Attr
49+
uint8_t lockCeil; //!< @memberof QK_Attr
50+
uint8_t intNest; //!< @memberof QK_Attr
5151
} QK_Attr;
5252

5353
//! @static @private @memberof QK

include/qp.h

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
//============================================================================
3333
#define QP_VERSION_STR "8.0.4"
3434
#define QP_VERSION 804U
35-
// <VER>=804 <DATE>=250531
36-
#define QP_RELEASE 0x6AABFDABU
35+
// <VER>=804 <DATE>=250611
36+
#define QP_RELEASE 0x6A9FC8ABU
3737

3838
//============================================================================
3939
// default configuration settings
@@ -509,26 +509,17 @@ typedef struct QActive {
509509

510510
#ifdef QACTIVE_THREAD_TYPE
511511
QACTIVE_THREAD_TYPE thread; //!< @protected @memberof QActive
512-
#endif // def QACTIVE_THREAD_TYPE
512+
#endif
513513

514514
#ifdef QACTIVE_OS_OBJ_TYPE
515515
QACTIVE_OS_OBJ_TYPE osObject; //!< @protected @memberof QActive
516-
#endif // def QACTIVE_OS_OBJ_TYPE
516+
#endif
517517

518518
#ifdef QACTIVE_EQUEUE_TYPE
519519
QACTIVE_EQUEUE_TYPE eQueue; //!< @protected @memberof QActive
520520
#endif // def QACTIVE_EQUEUE_TYPE
521521
} QActive;
522522

523-
//! @static @private @memberof QActive
524-
extern QActive * QActive_registry_[QF_MAX_ACTIVE + 1U];
525-
526-
//! @static @private @memberof QActive
527-
extern QSubscrList * QActive_subscrList_;
528-
529-
//! @static @private @memberof QActive
530-
extern enum_t QActive_maxPubSignal_;
531-
532523
//! @protected @memberof QActive
533524
void QActive_ctor(QActive * const me,
534525
QStateHandler const initial);
@@ -686,9 +677,6 @@ QTimeEvt * QTimeEvt_expire_(QTimeEvt * const me,
686677
//! @static @public @memberof QTimeEvt
687678
bool QTimeEvt_noActive(uint_fast8_t const tickRate);
688679

689-
//! @static @private @memberof QTimeEvt
690-
extern QTimeEvt QTimeEvt_timeEvtHead_[QF_MAX_TICK_RATE];
691-
692680
//============================================================================
693681
//! @class QTicker
694682
//! @extends QActive
@@ -714,7 +702,7 @@ void QTicker_dispatch_(
714702

715703
//! @private @memberof QTicker
716704
void QTicker_trig_(
717-
QActive * const me,
705+
QTicker * const me,
718706
void const * const sender);
719707

720708
//============================================================================
@@ -834,6 +822,6 @@ void QF_gcFromISR(QEvt const * const e);
834822

835823
#ifdef QF_MEM_ISOLATE
836824
#error Memory isolation not supported in this QP edition, need SafeQP
837-
#endif // def QF_MEM_ISOLATE
825+
#endif
838826

839827
#endif // QP_H_

include/qp_pkg.h

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

3232
//============================================================================
33-
#define QACTIVE_CAST_(ptr_) ((QActive *)(ptr_))
34-
#define Q_PTR2UINT_CAST_(ptr_) ((uintptr_t)(ptr_))
33+
// helper macros...
34+
#define QACTIVE_CAST_(ptr_) ((QActive *)(ptr_))
35+
#define QP_DIS_UPDATE_(T_, org_) ((T_)~(org_))
36+
#define QP_DIS_VERIFY_(T_, org_, dis_) ((T_)(org_) == (T_)~(dis_))
3537

3638
//============================================================================
3739
typedef struct {
@@ -50,6 +52,20 @@ void QF_bzero_(
5052
void * const start,
5153
uint_fast16_t const len);
5254

55+
//! @static @private @memberof QActive
56+
extern QActive * QActive_registry_[QF_MAX_ACTIVE + 1U];
57+
58+
//============================================================================
59+
//! @static @private @memberof QActive
60+
extern QSubscrList * QActive_subscrList_;
61+
62+
//! @static @private @memberof QActive
63+
extern QSignal QActive_maxPubSignal_;
64+
65+
//============================================================================
66+
//! @static @private @memberof QTimeEvt
67+
extern QTimeEvt QTimeEvt_timeEvtHead_[QF_MAX_TICK_RATE];
68+
5369
//============================================================================
5470
// Bitmasks are for the QTimeEvt::flags attribute
5571
#define QTE_FLAG_IS_LINKED (1U << 7U)

include/qs_dummy.h

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -84,55 +84,6 @@
8484
#define QS_RX_PUT(b_) ((void)0)
8585
#define QS_ONLY(code_) ((void)0)
8686

87-
//============================================================================
88-
// QS API used inside applications
89-
#ifndef QS_TIME_SIZE
90-
typedef uint32_t QSTimeCtr;
91-
#elif (QS_TIME_SIZE == 2U)
92-
typedef uint16_t QSTimeCtr;
93-
#else
94-
typedef uint32_t QSTimeCtr;
95-
#endif
96-
97-
void QS_initBuf(uint8_t * const sto, uint_fast32_t const stoSize);
98-
uint16_t QS_getByte(void);
99-
uint8_t const *QS_getBlock(uint16_t* const pNbytes);
100-
void QS_doOutput(void);
101-
uint8_t QS_onStartup(void const* arg);
102-
void QS_onCleanup(void);
103-
void QS_onFlush(void);
104-
QSTimeCtr QS_onGetTime(void);
105-
106-
void QS_rxInitBuf(uint8_t * const sto, uint16_t const stoSize);
107-
void QS_rxParse(void);
108-
109-
//============================================================================
110-
// QS API used inside test fixtures
111-
#ifdef Q_UTEST
112-
113-
#if (QS_FUN_PTR_SIZE == 2U)
114-
typedef uint16_t QSFun;
115-
#elif (QS_FUN_PTR_SIZE == 4U)
116-
typedef uint32_t QSFun;
117-
#elif (QS_FUN_PTR_SIZE == 8U)
118-
typedef uint64_t QSFun;
119-
#endif
120-
121-
struct QS_TProbe {
122-
QSFun addr;
123-
uint32_t data;
124-
uint8_t idx;
125-
};
126-
127-
void QS_onTestSetup(void);
128-
void QS_onTestTeardown(void);
129-
void QS_onTestEvt(QEvt *e);
130-
void QS_onTestPost(void const *sender, QActive *recipient,
131-
QEvt const *e, bool status);
132-
void QS_onTestLoop(void);
133-
134-
#endif // def Q_UTEST
135-
13687
//============================================================================
13788
// interface used only for internal implementation, but not in applications
13889
#ifdef QP_IMPL

include/qsafe.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#define Q_ASSERT_ID(id_, expr_) do { \
6161
QF_CRIT_STAT \
6262
QF_CRIT_ENTRY(); \
63-
(expr_) ? ((void)0) : Q_onError(&Q_this_module_[0], (id_)); \
63+
if (!(expr_)) Q_onError(&Q_this_module_[0], (id_)); \
6464
QF_CRIT_EXIT(); \
6565
} while (false)
6666

@@ -70,7 +70,7 @@
7070
} while (false)
7171

7272
#define Q_ASSERT_LOCAL(id_, expr_) do { \
73-
if (expr_) {} else { \
73+
if (!(expr_)) { \
7474
QF_CRIT_EST(); \
7575
Q_onError(&Q_this_module_[0], (id_)); \
7676
} \

include/qv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ typedef struct QV {
4040
//============================================================================
4141
//! @class QV_Attr
4242
typedef struct {
43-
QPSet readySet; //!< @private @memberof QV_Attr
44-
uint_fast8_t schedCeil; //!< @private @memberof QV_Attr
43+
QPSet readySet; //!< @private @memberof QV_Attr
44+
uint8_t schedCeil; //!< @private @memberof QV_Attr
4545
} QV_Attr;
4646

4747
//! @static @private @memberof QV

ports/posix-qv/qf_port.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ static int_t l_critSectNest; // critical section nesting up-down counter
158158
//............................................................................
159159
void QF_enterCriticalSection_(void) {
160160
pthread_mutex_lock(&l_critSectMutex_);
161-
Q_ASSERT_INCRIT(101, l_critSectNest == 0); // NO nesting of crit.sect!
161+
Q_ASSERT_INCRIT(100, l_critSectNest == 0); // NO nesting of crit.sect!
162162
++l_critSectNest;
163163
}
164164
//............................................................................
165165
void QF_leaveCriticalSection_(void) {
166-
Q_ASSERT_INCRIT(102, l_critSectNest == 1); // crit.sect. must balance!
166+
Q_ASSERT_INCRIT(200, l_critSectNest == 1); // crit.sect. must balance!
167167
if ((--l_critSectNest) == 0) {
168168
pthread_mutex_unlock(&l_critSectMutex_);
169169
}
@@ -362,7 +362,7 @@ void QActive_start(QActive * const me,
362362
// no per-AO stack needed for this port
363363
QF_CRIT_STAT
364364
QF_CRIT_ENTRY();
365-
Q_REQUIRE_INCRIT(600, stkSto == (void *)0);
365+
Q_REQUIRE_INCRIT(800, stkSto == (void *)0);
366366
QF_CRIT_EXIT();
367367

368368
me->prio = (uint8_t)(prioSpec & 0xFFU); // QF-priority of the AO
@@ -379,7 +379,9 @@ void QActive_start(QActive * const me,
379379
//............................................................................
380380
#ifdef QACTIVE_CAN_STOP
381381
void QActive_stop(QActive * const me) {
382-
QActive_unsubscribeAll(me);
382+
if (QActive_subscrList_ != (QSubscrList *)0) {
383+
QActive_unsubscribeAll(me); // unsubscribe from all events
384+
}
383385

384386
// make sure the AO is no longer in "ready set"
385387
QF_CRIT_STAT

0 commit comments

Comments
 (0)