QP/C  5.8.2
qf_pkg.h File Reference

Internal (package scope) QF/C interface. More...

Go to the source code of this file.

Data Structures

struct  QFreeBlock
 structure representing a free block in the Native QF Memory Pool More...
 

Macros

#define QF_CRIT_STAT_
 This is an internal macro for defining the critical section status type. More...
 
#define QF_CRIT_ENTRY_()   QF_CRIT_ENTRY(dummy)
 This is an internal macro for entering a critical section. More...
 
#define QF_CRIT_EXIT_()   QF_CRIT_EXIT(dummy)
 This is an internal macro for exiting a critical section. More...
 
#define QF_EVT_REF_CTR_INC_(e_)   (++((QEvt *)(e_))->refCtr_)
 increment the refCtr of an event e_ casting const away
 
#define QF_EVT_REF_CTR_DEC_(e_)   (--((QEvt *)(e_))->refCtr_)
 decrement the refCtr of an event e_ casting const away
 
#define QF_PTR_AT_(base_, i_)   ((base_)[(i_)])
 access element at index i_ from the base pointer base_
 
#define QF_PTR_RANGE_(x_, min_, max_)   (((min_) <= (x_)) && ((x_) <= (max_)))
 

Variables

QTimeEvt QF_timeEvtHead_ [QF_MAX_TICK_RATE]
 heads of linked lists of time events, one for every clock tick rate
 
QF_EPOOL_TYPE_ QF_pool_ [QF_MAX_EPOOL]
 allocate event pools
 
uint_fast8_t QF_maxPool_
 

of initialized event pools


 
QSubscrListQF_subscrList_
 the subscriber list array
 
enum_t QF_maxPubSignal_
 the maximum published signal
 

Detailed Description

Internal (package scope) QF/C interface.

Definition in file qf_pkg.h.


Data Structure Documentation

◆ QFreeBlock

struct QFreeBlock

structure representing a free block in the Native QF Memory Pool

Definition at line 101 of file qf_pkg.h.

Data Fields
struct QFreeBlock *volatile next

Macro Definition Documentation

◆ QF_CRIT_ENTRY_

#define QF_CRIT_ENTRY_ ( )    QF_CRIT_ENTRY(dummy)

This is an internal macro for entering a critical section.

Description
The purpose of this macro is to enable writing the same code for the case when critical section status type is defined and when it is not. If the macro QF_CRIT_STAT_TYPE is defined, this internal macro invokes QF_CRIT_ENTRY passing the key variable as the parameter. Otherwise QF_CRIT_ENTRY is invoked with a dummy parameter.
See also
QF_CRIT_ENTRY

Definition at line 69 of file qf_pkg.h.

◆ QF_CRIT_EXIT_

#define QF_CRIT_EXIT_ ( )    QF_CRIT_EXIT(dummy)

This is an internal macro for exiting a critical section.

Description
The purpose of this macro is to enable writing the same code for the case when critical section status type is defined and when it is not. If the macro QF_CRIT_STAT_TYPE is defined, this internal macro invokes QF_CRIT_EXIT passing the key variable as the parameter. Otherwise QF_CRIT_EXIT is invoked with a dummy parameter.
See also
QF_CRIT_EXIT

Definition at line 81 of file qf_pkg.h.

◆ QF_CRIT_STAT_

#define QF_CRIT_STAT_

This is an internal macro for defining the critical section status type.

Description
The purpose of this macro is to enable writing the same code for the case when critical section status type is defined and when it is not. If the macro QF_CRIT_STAT_TYPE is defined, this internal macro provides the definition of the critical section status variable. Otherwise this macro is empty.
See also
QF_CRIT_STAT_TYPE

Definition at line 57 of file qf_pkg.h.

◆ QF_PTR_RANGE_

#define QF_PTR_RANGE_ (   x_,
  min_,
  max_ 
)    (((min_) <= (x_)) && ((x_) <= (max_)))
Description
This macro is specifically and exclusively used for checking the range of a block pointer returned to the pool. Such a check must rely on the pointer arithmetic not compliant with the MISRA-C 2004 rules 17.2(req) and 17.3(req). Defining a specific macro for this purpose allows to selectively disable the warnings for this particular case.

Definition at line 124 of file qf_pkg.h.