54Q_DEFINE_THIS_MODULE(
"qf_qact")
59#if (QP_VERSION < 700U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
60#error qpc version 7.0.0 or higher required
75uint_fast8_t
volatile QF_intLock_;
80uint_fast8_t
volatile QF_intNest_;
86QPSet QF_readySet_rmc_;
97 uint_fast16_t
const len)
99 uint8_t *ptr = (uint8_t *)start;
100 for (uint_fast16_t n = len; n > 0U; --n) {
119 ,&QHsm_getStateHandler_
130 QF_bzero(me,
sizeof(*me));
132 QHsm_ctor(&me->
super, initial);
141 if (me->
pthre == 0U) {
151 uint8_t prev_thre = me->
pthre;
152 uint8_t next_thre = me->
pthre;
155 for (p = (uint_fast8_t)me->
prio - 1U; p > 0U; --p) {
156 if (QActive_registry_[p] != (
QActive *)0) {
157 prev_thre = QActive_registry_[p]->pthre;
162 if (QActive_registry_[p] != (
QActive *)0) {
163 next_thre = QActive_registry_[p]->pthre;
175 QActive_registry_[me->
prio] = me;
184 uint_fast8_t
const p = (uint_fast8_t)me->
prio;
187 && (QActive_registry_[p] == me));
190 QActive_registry_[p] = (
QActive *)0;
202 static uint8_t
const log2LUT[16] = {
203 0U, 1U, 2U, 2U, 3U, 3U, 3U, 3U,
204 4U, 4U, 4U, 4U, 4U, 4U, 4U, 4U
209 #if (QF_MAX_ACTIVE > 16U)
216 #if (QF_MAX_ACTIVE > 8U)
228 return n + log2LUT[x];
Customizable and memory-efficient Design by Contract (DbC) for embedded systems.
#define Q_ENSURE_ID(id_, expr_)
#define Q_REQUIRE_ID(id_, expr_)
#define Q_STATE_CAST(handler_)
QState(* QStateHandler)(void *const me, QEvt const *const e)
Internal (package scope) QF/C interface.
QF/C sample port with all configurable options.
void QActive_start_(QActive *const me, QPrioSpec const prioSpec, QEvt const **const qSto, uint_fast16_t const qLen, void *const stkSto, uint_fast16_t const stkSize, void const *const par)
Active object class (based on the QHsm implementation strategy)
Virtual table for the QActive class.
struct QHsmVtable const * vptr
Priority Set of up to QF_MAX_ACTIVE elements.