56 #error "Source file included in a project NOT based on the QXK kernel"
59Q_DEFINE_THIS_MODULE(
"qxk_mutex")
63#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
64#error qpc version 7.3.0 or higher required
74void QXMutex_init(
QXMutex *
const me,
83 me->
ao.
prio = (uint8_t)(prioSpec & 0xFFU);
90 QActive_register_(ao);
115 QXK_priv_.lockHolder != (uint_fast8_t)curr->
super.
prio);
134 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.head);
135 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.nFree);
146 QPSet_remove(&QXK_priv_.readySet,
148 QPSet_insert(&QXK_priv_.readySet,
149 (uint_fast8_t)me->
ao.
prio);
151 QPSet_update_(&QXK_priv_.readySet, &QXK_priv_.readySet_dis);
175 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.head);
176 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.nFree);
191 uint_fast8_t
const p = (uint_fast8_t)curr->
super.
prio;
192 QPSet_remove(&QXK_priv_.readySet, p);
194 QPSet_update_(&QXK_priv_.readySet, &QXK_priv_.readySet_dis);
205 QS_2U8_PRE_((uint8_t)me->
ao.
eQueue.head,
225 if (QPSet_hasElement(&me->
waitSet, p)) {
249 QActive *curr = QXK_priv_.curr;
263 QXK_priv_.lockHolder != (uint_fast8_t)curr->
prio);
281 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.head);
282 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.nFree);
293 QPSet_remove(&QXK_priv_.readySet,
295 QPSet_insert(&QXK_priv_.readySet,
296 (uint_fast8_t)me->
ao.
prio);
298 QPSet_update_(&QXK_priv_.readySet, &QXK_priv_.readySet_dis);
320 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.head);
321 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.nFree);
334 QS_2U8_PRE_((uint8_t)me->
ao.
eQueue.head,
353 QActive *curr = QXK_priv_.curr;
381 QPSet_remove(&QXK_priv_.readySet,
382 (uint_fast8_t)me->
ao.
prio);
383 QPSet_insert(&QXK_priv_.readySet,
386 QPSet_update_(&QXK_priv_.readySet, &QXK_priv_.readySet_dis);
393 QS_2U8_PRE_((uint8_t)me->
ao.
eQueue.head,
398 if (QPSet_notEmpty(&me->
waitSet)) {
400 uint_fast8_t
const p = QPSet_findMax(&me->
waitSet);
405 QPSet_insert(&QXK_priv_.readySet, p);
407 QPSet_update_(&QXK_priv_.readySet, &QXK_priv_.readySet_dis);
425 (void)QXThread_teDisarm_(thr);
436 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.head);
437 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.nFree);
465 if (QXK_sched_() != 0U) {
475 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.head);
476 QS_U8_PRE_((uint8_t)me->
ao.
eQueue.nFree);
QActive * QActive_registry_[QF_MAX_ACTIVE+1U]
#define Q_ACTION_CAST(action_)
#define QF_CRIT_EXIT_NOP()
Internal (package scope) QP/C interface.
#define QACTIVE_CAST_(ptr_)
#define QXK_ISR_CONTEXT_()
Check if the code executes in the ISR context.
@ QS_MTX_UNLOCK
a mutex was unlocked
@ QS_MTX_BLOCK
a mutex blocked a thread
@ QS_MTX_UNLOCK_ATTEMPT
a mutex unlock was attempted
@ QS_MTX_LOCK
a mutex was locked
@ QS_MTX_BLOCK_ATTEMPT
a mutex blocking was attempted
QS/C package-scope interface.
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)
#define QXK_PTR_CAST_(type_, ptr_)
Active object class (based on the QHsm implementation strategy)
QACTIVE_OS_OBJ_TYPE osObject
QACTIVE_EQUEUE_TYPE eQueue
State object for the QMsm class (QM State Machine).
Blocking Mutex of the QXK preemptive kernel.
eXtended (blocking) thread of the QXK preemptive kernel
struct QMState const * obj