51 #include "qs_dummy.hpp"
56 #error "Source file included in a project NOT based on the QXK kernel"
61Q_DEFINE_THIS_MODULE(
"qxk_sema")
66#if (QP_VERSION < 730U) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8U))
67#error qpcpp version 7.3.0 or higher required
78 std::uint_fast8_t
const count,
79 std::uint_fast8_t
const max_count)
noexcept
86 && (0U < max_count) && (max_count <= 0xFFU));
88 m_count =
static_cast<std::uint8_t
>(count);
89 m_max_count =
static_cast<std::uint8_t
>(max_count);
110 && (m_max_count > 0U)
118 m_count = m_count - 1U;
123 QS_2U8_PRE_(curr->
m_prio, m_count);
127 std::uint_fast8_t
const p =
128 static_cast<std::uint_fast8_t
>(curr->
m_prio);
144 QS_2U8_PRE_(curr->
m_prio, m_count);
163 if (m_waitSet.hasElement(p)) {
223 bool signaled =
true;
Active object class (based on the QHsm implementation strategy)
static QActive * registry_[QF_MAX_ACTIVE+1U]
QACTIVE_OS_OBJ_TYPE m_osObject
void update_(QPSet *const dis) const noexcept
void remove(std::uint_fast8_t const n) noexcept
std::uint_fast8_t findMax() const noexcept
void insert(std::uint_fast8_t const n) noexcept
bool notEmpty() const noexcept
void init(std::uint_fast8_t const count, std::uint_fast8_t const max_count=0xFFU) noexcept
bool wait(QTimeEvtCtr const nTicks=QXTHREAD_NO_TIMEOUT) noexcept
eXtended (blocking) thread of the QXK preemptive kernel
bool teDisarm_() noexcept
void teArm_(enum_t const sig, QTimeEvtCtr const nTicks) noexcept
QP::QActive *volatile curr
std::uint_fast8_t volatile lockHolder
std::uint32_t QTimeEvtCtr
@ QS_SEM_SIGNAL
a semaphore was signaled
@ QS_SEM_TAKE
a semaphore was taken by a thread
@ QS_SEM_BLOCK
a semaphore blocked a thread
@ QS_SEM_BLOCK_ATTEMPT
a semaphore blocked was attempted
#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/C++ package-scope interface.
QS/C++ port to a 32-bit CPU, generic C++ compiler.
QP Functional Safety (FuSa) Subsystem.
#define Q_ASSERT_INCRIT(id_, expr_)
#define Q_REQUIRE_INCRIT(id_, expr_)
#define QXK_PTR_CAST_(type_, ptr_)
std::uint_fast8_t QXK_sched_() noexcept
State object for the QP::QMsm class (QM State Machine).