36 #include "qs_port.hpp"
39 #include "qs_dummy.hpp"
56 : m_frontEvt(
nullptr),
82 std::uint_fast16_t
const qLen)
noexcept
120 std::uint_fast16_t
const margin,
121 std::uint_fast8_t
const qs_id)
noexcept
136 if (e->poolId_ != 0U) {
142 if (m_nMin > nFree) {
156 if (m_frontEvt ==
nullptr) {
168 m_head = (m_head - 1U);
190 static_cast<void>(qs_id);
218 std::uint_fast8_t
const qs_id)
noexcept
220 static_cast<void>(qs_id);
230 if (e->poolId_ != 0U) {
236 if (m_nMin > nFree) {
249 QEvt const *
const frontEvt = m_frontEvt;
253 if (frontEvt !=
nullptr) {
254 m_tail = (m_tail + 1U);
255 if (m_tail == m_end) {
258 m_ring[m_tail] = frontEvt;
282 static_cast<void>(qs_id);
286 QEvt const *
const e = m_frontEvt;
294 if (nFree <= m_end) {
295 m_frontEvt = m_ring[m_tail];
299 m_tail = (m_tail - 1U);
310 m_frontEvt =
nullptr;
QEvt const * get(std::uint_fast8_t const qs_id) noexcept
"raw" thread-safe QF event queue implementation for the Last-In-First-Out (LIFO) event posting.
void init(QEvt const *qSto[], std::uint_fast16_t const qLen) noexcept
Initializes the native QF event queue.
void postLIFO(QEvt const *const e, std::uint_fast8_t const qs_id) noexcept
"raw" thread-safe QF event queue implementation for the First-In-First-Out (FIFO) event posting.
bool post(QEvt const *const e, std::uint_fast16_t const margin, std::uint_fast8_t const qs_id) noexcept
"raw" thread-safe QF event queue implementation for the event posting (FIFO).
QEQueue(void) noexcept
public default constructor
namespace associated with the QP/C++ framework
std::uint8_t QEQueueCtr
The data type to store the ring-buffer counters based on the macro #QF_EQUEUE_CTR_SIZE.
std::uint_fast16_t const QF_NO_MARGIN
special value of margin that causes asserting failure in case event allocation or event posting fails
@ QS_QF_EQUEUE_GET_LAST
get the last event from the queue
@ QS_QF_EQUEUE_POST_ATTEMPT
attempt to post an evt to QEQueue failed
@ QS_QF_EQUEUE_POST_LIFO
an event was posted (LIFO) to a raw queue
@ QS_QF_EQUEUE_GET
get an event and queue still not empty
@ QS_QF_EQUEUE_POST
an event was posted (FIFO) to a raw queue
void QF_EVT_REF_CTR_INC_(QEvt const *const e) noexcept
increment the refCtr_ of an event e
Customizable and memory-efficient assertions for embedded systems.
#define Q_DEFINE_THIS_MODULE(name_)
#define Q_REQUIRE_ID(id_, test_)
Internal (package scope) QF/C++ interface.
#define QF_CRIT_STAT_
This is an internal macro for defining the critical section status type.
#define Q_ASSERT_CRIT_(id_, test_)
#define QF_CRIT_X_()
This is an internal macro for exiting a critical section.
#define Q_REQUIRE_CRIT_(id_, test_)
#define QF_CRIT_E_()
This is an internal macro for entering a critical section.
Internal (package scope) QS/C++ interface.
#define QS_BEGIN_NOCRIT_PRE_(rec_, qs_id_)
Internal QS macro to begin a predefined QS record without critical section.
#define QS_OBJ_PRE_(obj_)
Internal QS macro to output object pointer data element.
#define QS_END_NOCRIT_PRE_()
Internal QS macro to end a predefiend QS record without critical section.
#define QS_2U8_PRE_(data1_, data2_)
Internal QS macro to output 2 unformatted uint8_t data elements.
#define QS_EQC_PRE_(ctr_)
Internal QS macro to output an unformatted event queue counter data element.
QSignal sig
signal of the event instance
std::uint8_t volatile refCtr_
reference counter
std::uint8_t poolId_
pool ID (0 for static event)