Reference Manual For QP/C++ 8.1.5
Loading...
Searching...
No Matches
qv.hpp
Go to the documentation of this file.
1//============================================================================
2// QP/C++ Real-Time Event Framework (RTEF)
3//
4// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
5//
6// Q u a n t u m L e a P s
7// ------------------------
8// Modern Embedded Software
9//
10// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
11//
12// This software is dual-licensed under the terms of the open-source GNU
13// General Public License (GPL) or under the terms of one of the closed-
14// source Quantum Leaps commercial licenses.
15//
16// Redistributions in source code must retain this top-level comment block.
17// Plagiarizing this software to sidestep the license obligations is illegal.
18//
19// NOTE:
20// The GPL does NOT permit the incorporation of this code into proprietary
21// programs. Please contact Quantum Leaps for commercial licensing options,
22// which expressly supersede the GPL and are designed explicitly for
23// closed-source distribution.
24//
25// Quantum Leaps contact information:
26// <www.state-machine.com/licensing>
27// <info@state-machine.com>
28//============================================================================
29#ifndef QV_HPP_
30#define QV_HPP_
31
32//============================================================================
33namespace QP {
34
35//----------------------------------------------------------------------------
36class QV {
37public:
39
40
41 QV() noexcept;
42 static void onIdle();
43
44 static QV priv_;
45
46}; // class QV
47
48} // namespace QP
49
50//============================================================================
51// interface used only for internal implementation, but not in applications
52
53#ifdef QP_IMPL
54//! @cond INTERNAL
55
56// scheduler locking for QV (not needed)...
57#define QF_SCHED_STAT_
58#define QF_SCHED_LOCK_(dummy) (static_cast<void>(0))
59#define QF_SCHED_UNLOCK_() (static_cast<void>(0))
60
61// QActive event queue customization for QV...
62#define QACTIVE_EQUEUE_WAIT_(me_) (static_cast<void>(0))
63#define QACTIVE_EQUEUE_SIGNAL_(me_) \
64 (QV::priv_.readySet.insert((me_)->m_prio))
65
66// QMPool operations
67#define QF_EPOOL_TYPE_ QMPool
68#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
69 (p_).init((poolSto_), (poolSize_), (evtSize_))
70#define QF_EPOOL_EVENT_SIZE_(p_) ((p_).getBlockSize())
71#define QF_EPOOL_GET_(p_, e_, m_, qsId_) \
72 ((e_) = static_cast<QEvt *>((p_).get((m_), (qsId_))))
73#define QF_EPOOL_PUT_(p_, e_, qsId_) ((p_).put((e_), (qsId_)))
74#define QF_EPOOL_USE_(ePool_) ((ePool_)->getUse())
75#define QF_EPOOL_FREE_(ePool_) ((ePool_)->getFree())
76#define QF_EPOOL_MIN_(ePool_) ((ePool_)->getMin())
77
78//! @endcond
79#endif // QP_IMPL
80
81#endif // QV_HPP_
Set of Active Objects of up to QF_MAX_ACTIVE elements.
Definition qp.hpp:449
QPSet readySet
Set of active-objects/threads that are ready to run in the QV kernel \clearpage .
Definition qv.hpp:38
static void onIdle()
QP/C++ Framework namespace \clearpage .
Definition qequeue.hpp:36