QP/C++ 6.9.3
qxk_pkg.hpp File Reference

Internal (package scope) QXK/C++ interface. More...

#include "qf_pkg.hpp"
Include dependency graph for qxk_pkg.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 QP
 namespace associated with the QP/C++ framework
 

Macros

#define QXK_PTR_CAST_(type_, ptr_)   (reinterpret_cast<type_>(ptr_))
 intertnal macro to encapsulate casting of pointers for MISRA deviations More...
 

Enumerations

enum  QXK_Timeouts : std::uint8_t { QXK_DELAY_SIG = Q_USER_SIG , QXK_QUEUE_SIG , QXK_SEMA_SIG }
 timeout signals More...
 

Functions

void QXK_stackInit_ (void *thr, QP::QXThreadHandler const handler, void *const stkSto, std::uint_fast16_t const stkSize) noexcept
 initialize the private stack of a given AO More...
 
void QXK_threadRet_ (void) noexcept
 called when a thread function returns More...
 

Detailed Description

Internal (package scope) QXK/C++ interface.

Definition in file qxk_pkg.hpp.

Macro Definition Documentation

◆ QXK_PTR_CAST_

#define QXK_PTR_CAST_ (   type_,
  ptr_ 
)    (reinterpret_cast<type_>(ptr_))

intertnal macro to encapsulate casting of pointers for MISRA deviations

Description
This macro is specifically and exclusively used for casting pointers that are never de-referenced, but only used for internal bookkeeping and checking (via assertions) the correct operation of the QXK kernel. Such pointer casting is not compliant with MISRA C++ Rule 5-2-7 as well as other messages (e.g., PC-Lint-Plus warning 826). Defining this specific macro for this purpose allows to selectively disable the warnings for this particular case.

Definition at line 76 of file qxk_pkg.hpp.

Function Documentation

◆ QXK_stackInit_()

void QXK_stackInit_ ( void *  thr,
QP::QXThreadHandler const  handler,
void *const  stkSto,
std::uint_fast16_t const  stkSize 
)
noexcept

initialize the private stack of a given AO

◆ QXK_threadRet_()

void QXK_threadRet_ ( void  )
noexcept

called when a thread function returns

Description
Called when the extended-thread handler function returns.
Note
Most thread handler functions are structured as endless loops that never return. But it is also possible to structure threads as one-shot functions that perform their job and return. In that case this function peforms cleanup after the thread.
Precondition
this function must:
  • NOT be called from an ISR;
  • be called from an extended thread;
also: the thread must NOT be holding a scheduler lock.

Definition at line 618 of file qxk_xthr.cpp.