39 #include "qf_port.hpp"
84 void QF::poolInit(
void * const poolSto,
99 || (lastEvtSize < evtSize));
106 char_t obj_name[9] =
"EvtPool?";
107 obj_name[7] =
static_cast<char_t>(
168 e->sig =
static_cast<QSignal>(sig);
221 if (e->poolId_ != 0U) {
226 if (e->refCtr_ > 1U) {
292 QEvt const *
const evtRef) noexcept
297 && (evtRef ==
nullptr));
unsigned int uint_fast16_t
fast at-least 16-bit unsigned int
unsigned char uint8_t
exact-width 8-bit unsigned int
unsigned int uint_fast8_t
fast at-least 8-bit unsigned int
unsigned long uint_fast32_t
fast at-least 32-bit unsigned int
signed char int8_t
exact-width 8-bit signed int
static void gc(QEvt const *const e) noexcept
Recycle a dynamic event.
static void deleteRef_(QEvt const *const evtRef) noexcept
Internal QF implementation of deleting event reference.
static QEvt * newX_(std::uint_fast16_t const evtSize, std::uint_fast16_t const margin, enum_t const sig) noexcept
Internal QF implementation of creating new dynamic event.
static std::uint_fast16_t poolGetMaxBlockSize(void) noexcept
Obtain the block size of any registered event pools.
static QEvt const * newRef_(QEvt const *const e, QEvt const *const evtRef) noexcept
Internal QF implementation of creating new event reference.
static void obj_dict_pre_(void const *const obj, char_t const *name) noexcept
Output object dictionary record.
#define QF_EPOOL_PUT_(p_, e_, qs_id_)
Platform-dependent macro defining how QF should return an event e_ to the event pool p_.
#define QF_EPOOL_GET_(p_, e_, m_, qs_id_)
Platform-dependent macro defining how QF should obtain an event e_ from the event pool p_.
#define QF_EPOOL_EVENT_SIZE_(p_)
Platform-dependent macro defining how QF should obtain the event pool block-size.
#define QF_EPOOL_TYPE_
This macro defines the type of the event pool used in this QF port.
#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_)
Platform-dependent macro defining the event pool initialization.
namespace associated with the QP/C++ framework
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_EP_ID
offset for event-pool IDs
@ QS_QF_DELETE_REF
an event reference is about to be deleted
@ QS_QF_GC_ATTEMPT
garbage collection attempt
@ QS_QF_GC
garbage collection
@ QS_QF_NEW_ATTEMPT
an attempt to allocate an event failed
@ QS_QF_NEW_REF
new event reference was created
@ QS_QF_NEW
new event was created
void QF_EVT_REF_CTR_INC_(QEvt const *const e) noexcept
increment the refCtr_ of an event e
std::uint_fast8_t QF_maxPool_
QF_EPOOL_TYPE_ QF_pool_[QF_MAX_EPOOL]
allocate event pools
std::uint16_t QSignal
QSignal represents the signal of an event.
void QF_EVT_REF_CTR_DEC_(QEvt const *const e) noexcept
decrement the refCtr_ of an event e
Customizable and memory-efficient assertions for embedded systems.
#define Q_DEFINE_THIS_MODULE(name_)
Define the user-specified module name for assertions in this file.
char char_t
typedef for character strings.
#define Q_ASSERT_ID(id_, test_)
General purpose assertion with user-specified assertion-id.
#define Q_REQUIRE_ID(id_, test_)
Assertion for checking preconditions with user-specified assertion-id.
#define Q_DIM(array_)
Helper macro to calculate static dimension of a 1-dim array_.
int enum_t
alias for enumerations used for event signals
Internal (package scope) QF/C++ interface.
#define QF_CRIT_STAT_
This is an internal macro for defining the critical section status type.
#define QF_EVT_CONST_CAST_(e_)
helper macro to cast const away from an event pointer e_
#define QF_CRIT_X_()
This is an internal macro for exiting a critical section.
#define QF_CRIT_E_()
This is an internal macro for entering a critical section.
#define QS_CRIT_STAT_
This is an internal macro for defining the critical section status type.
Dummy definitions of the QS macros that avoid code generation from the QS instrumentation.
#define QS_BEGIN_PRE_(rec_, qs_id_)
#define QS_BEGIN_NOCRIT_PRE_(rec_, qs_id_)
#define QS_END_NOCRIT_PRE_()
#define QS_2U8_PRE_(data1_, data2_)
#define QS_EVS_PRE_(size_)
#define QS_SIG_PRE_(sig_)
Internal (package scope) QS/C++ interface.
QS/C++ port to a 32-bit CPU, generic compiler.
#define QF_MAX_EPOOL
The maximum number of event pools in the application.