56 #error "Source file included in a project NOT based on the QXK kernel"
59Q_DEFINE_THIS_MODULE(
"qxk_sema")
63#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
64#error qpc version 7.3.0 or higher required
75 uint_fast8_t
const count,
76 uint_fast8_t
const max_count)
83 && (0U < max_count) && (max_count <= 0xFFU));
85 me->
count = (uint8_t)count;
115 QXK_priv_.lockHolder != (uint_fast8_t)curr->
super.
prio);
118 if (me->
count > 0U) {
128 uint_fast8_t
const p = (uint_fast8_t)curr->
super.
prio;
131 QPSet_remove(&QXK_priv_.readySet, p);
133 QPSet_update_(&QXK_priv_.readySet, &QXK_priv_.readySet_dis);
163 if (QPSet_hasElement(&me->
waitSet, p)) {
197 if (me->
count > 0U) {
225 bool signaled =
true;
236 if (QPSet_notEmpty(&me->
waitSet)) {
238 uint_fast8_t
const p = QPSet_findMax(&me->
waitSet);
252 (void)QXThread_teDisarm_(thr);
255 QPSet_insert(&QXK_priv_.readySet, p);
257 QPSet_update_(&QXK_priv_.readySet, &QXK_priv_.readySet_dis);
277 QS_2U8_PRE_(0U, me->
count);
QActive * QActive_registry_[QF_MAX_ACTIVE+1U]
#define QF_CRIT_EXIT_NOP()
Internal (package scope) QP/C interface.
#define QXK_ISR_CONTEXT_()
Check if the code executes in the ISR context.
@ QS_SEM_BLOCK
a semaphore blocked a thread
@ QS_SEM_BLOCK_ATTEMPT
a semaphore blocked was attempted
@ QS_SEM_TAKE
a semaphore was taken by a thread
@ QS_SEM_SIGNAL
a semaphore was signaled
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
State object for the QMsm class (QM State Machine).
Counting Semaphore of the QXK preemptive kernel.
eXtended (blocking) thread of the QXK preemptive kernel
struct QMState const * obj