QP/C  7.4.0-rc.2
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qk.h File Reference

QK/C (preemptive non-blocking kernel) platform-independent public interface. More...

Go to the source code of this file.

Classes

class  QK
 QK preemptive non-blocking kernel (QK namespace emulated as a "class" in C) More...
 
class  QK_Attr
 Private attributes of the QK kernel. More...
 

Macros

#define QF_SCHED_STAT_   QSchedStatus lockStat_;
 
#define QF_SCHED_LOCK_(ceil_)
 
#define QF_SCHED_UNLOCK_()
 
#define QACTIVE_EQUEUE_WAIT_(me_)    Q_ASSERT_INCRIT(320, (me_)->eQueue.frontEvt != (QEvt *)0)
 
#define QACTIVE_EQUEUE_SIGNAL_(me_)
 
#define QF_EPOOL_TYPE_   QMPool
 
#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_)    (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_)))
 
#define QF_EPOOL_EVENT_SIZE_(p_)   ((uint_fast16_t)(p_).blockSize)
 
#define QF_EPOOL_GET_(p_, e_, m_, qsId_)    ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qsId_)))
 
#define QF_EPOOL_PUT_(p_, e_, qsId_)    (QMPool_put(&(p_), (e_), (qsId_)))
 

Typedefs

typedef uint_fast8_t QSchedStatus
 

Detailed Description

QK/C (preemptive non-blocking kernel) platform-independent public interface.

Traceability
  • DVP-QP-MC4-D04_08

Definition in file qk.h.

Macro Definition Documentation

◆ QF_SCHED_STAT_

#define QF_SCHED_STAT_   QSchedStatus lockStat_;

Definition at line 146 of file qk.h.

◆ QF_SCHED_LOCK_

#define QF_SCHED_LOCK_ ( ceil_)
Value:
do { \
if (QK_ISR_CONTEXT_()) { \
lockStat_ = 0xFFU; \
} else { \
lockStat_ = QK_schedLock((ceil_)); \
} \
} while (false)
#define QK_ISR_CONTEXT_()
Definition qp_port.h:105

Definition at line 149 of file qk.h.

◆ QF_SCHED_UNLOCK_

#define QF_SCHED_UNLOCK_ ( )
Value:
do { \
if (lockStat_ != 0xFFU) { \
QK_schedUnlock(lockStat_); \
} \
} while (false)

Definition at line 158 of file qk.h.

◆ QACTIVE_EQUEUE_WAIT_

#define QACTIVE_EQUEUE_WAIT_ ( me_)     Q_ASSERT_INCRIT(320, (me_)->eQueue.frontEvt != (QEvt *)0)

Definition at line 165 of file qk.h.

◆ QACTIVE_EQUEUE_SIGNAL_

#define QACTIVE_EQUEUE_SIGNAL_ ( me_)
Value:
do { \
QPSet_insert(&QK_priv_.readySet, (uint_fast8_t)(me_)->prio); \
QPSet_update_(&QK_priv_.readySet, &QK_priv_.readySet_dis); \
if (!QK_ISR_CONTEXT_()) { \
if (QK_sched_() != 0U) { \
QK_activate_(); \
} \
} \
} while (false)

Definition at line 170 of file qk.h.

◆ QF_EPOOL_TYPE_

#define QF_EPOOL_TYPE_   QMPool

Definition at line 197 of file qk.h.

◆ QF_EPOOL_INIT_

#define QF_EPOOL_INIT_ ( p_,
poolSto_,
poolSize_,
evtSize_ )    (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_)))

Definition at line 200 of file qk.h.

◆ QF_EPOOL_EVENT_SIZE_

#define QF_EPOOL_EVENT_SIZE_ ( p_)    ((uint_fast16_t)(p_).blockSize)

Definition at line 204 of file qk.h.

◆ QF_EPOOL_GET_

#define QF_EPOOL_GET_ ( p_,
e_,
m_,
qsId_ )    ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qsId_)))

Definition at line 207 of file qk.h.

◆ QF_EPOOL_PUT_

#define QF_EPOOL_PUT_ ( p_,
e_,
qsId_ )    (QMPool_put(&(p_), (e_), (qsId_)))

Definition at line 211 of file qk.h.

Typedef Documentation

◆ QSchedStatus

typedef uint_fast8_t QSchedStatus

The scheduler lock status for QK_schedLock() and QK_schedUnlock()

The scheduler lock status for QK::schedLock() and QK::schedUnlock()

Definition at line 60 of file qk.h.