QP/C 6.9.2
qv.h File Reference

QV/C (cooperative "Vanilla" kernel) platform-independent public interface. More...

#include "qequeue.h"
#include "qmpool.h"
#include "qpset.h"
Include dependency graph for qv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define QF_EQUEUE_TYPE   QEQueue
#define QF_SCHED_STAT_
#define QF_SCHED_LOCK_(dummy)   ((void)0)
#define QF_SCHED_UNLOCK_(dummy)   ((void)0)
#define QACTIVE_EQUEUE_WAIT_(me_)    Q_ASSERT_ID(0, (me_)->eQueue.frontEvt != (QEvt *)0)
#define QACTIVE_EQUEUE_SIGNAL_(me_)    QPSet_insert(&QV_readySet_, (uint_fast8_t)(me_)->prio)
#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_, qs_id_)    ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_)))
#define QF_EPOOL_PUT_(p_, e_, qs_id_)    (QMPool_put(&(p_), (e_), (qs_id_)))


void QV_onIdle (void)
 QV idle callback (customized in BSPs) More...


QPSet QV_readySet_
 QV ready-set of AOs. More...

Detailed Description

QV/C (cooperative "Vanilla" kernel) platform-independent public interface.

Definition in file qv.h.

Macro Definition Documentation


#define QF_EQUEUE_TYPE   QEQueue

Definition at line 49 of file qv.h.


#define QF_SCHED_STAT_

Definition at line 83 of file qv.h.


#define QF_SCHED_LOCK_ (   dummy)    ((void)0)

Definition at line 84 of file qv.h.


#define QF_SCHED_UNLOCK_ (   dummy)    ((void)0)

Definition at line 85 of file qv.h.


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

Definition at line 88 of file qv.h.


#define QACTIVE_EQUEUE_SIGNAL_ (   me_)     QPSet_insert(&QV_readySet_, (uint_fast8_t)(me_)->prio)

Definition at line 91 of file qv.h.


#define QF_EPOOL_TYPE_   QMPool

Definition at line 95 of file qv.h.


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

Definition at line 96 of file qv.h.


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

Definition at line 98 of file qv.h.


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

Definition at line 99 of file qv.h.


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

Definition at line 101 of file qv.h.

Function Documentation

◆ QV_onIdle()

void QV_onIdle ( void  )

QV idle callback (customized in BSPs)

QV_onIdle() is called by the cooperative QV kernel (from QF_run()) when the scheduler detects that no events are available for active objects (the idle condition). This callback gives the application an opportunity to enter a power-saving CPU mode, or perform some other idle processing (such as QS software tracing output).
QV_onIdle() is invoked with interrupts DISABLED because the idle condition can be asynchronously changed at any time by an interrupt. QV_onIdle() MUST enable the interrupts internally, but not before putting the CPU into the low-power mode. (Ideally, enabling interrupts and low-power mode should happen atomically). At the very least, the function MUST enable interrupts, otherwise interrupts will remain disabled permanently.
QV_onIdle() is only used by the cooperative QV kenrnel in the native (bare metal) QF ports, and is NOT used in any other QF ports. When QF is combined with the preemptive QK, the QK idle loop calls a different function QK_onIdle(), with different semantics than QV_onIdle(). When QF is combined with a 3rd-party RTOS or kernel, the idle processing mechanism of the RTOS or kernel is used instead of QV_onIdle().

Variable Documentation

◆ QV_readySet_

QPSet QV_readySet_

QV ready-set of AOs.

Definition at line 60 of file qv.c.