QP/C++  7.4.0-rc.1
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qv.hpp
Go to the documentation of this file.
1//$file${include::qv.hpp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2//
3// Model: qpcpp.qm
4// File: ${include::qv.hpp}
5//
6// This code has been generated by QM 6.1.1 <www.state-machine.com/qm>.
7// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
8//
9// This code is covered by the following QP license:
10// License # : LicenseRef-QL-dual
11// Issued to : Any user of the QP/C++ real-time embedded framework
12// Framework(s) : qpcpp
13// Support ends : 2024-12-31
14// License scope:
15//
16// Copyright (C) 2005 Quantum Leaps, LLC <state-machine.com>.
17//
18// Q u a n t u m L e a P s
19// ------------------------
20// Modern Embedded Software
21//
22// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
23//
24// This software is dual-licensed under the terms of the open source GNU
25// General Public License version 3 (or any later version), or alternatively,
26// under the terms of one of the closed source Quantum Leaps commercial
27// licenses.
28//
29// The terms of the open source GNU General Public License version 3
30// can be found at: <www.gnu.org/licenses/gpl-3.0>
31//
32// The terms of the closed source Quantum Leaps commercial licenses
33// can be found at: <www.state-machine.com/licensing>
34//
35// Redistributions in source code must retain this top-level comment block.
36// Plagiarizing this software to sidestep the license obligations is illegal.
37//
38// Contact information:
39// <www.state-machine.com/licensing>
40// <info@state-machine.com>
41//
42//$endhead${include::qv.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43#ifndef QV_HPP_
44#define QV_HPP_
45
46//$declare${QV::QV-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
47namespace QP {
48namespace QV {
49
50//${QV::QV-base::Attr} .......................................................
51class Attr {
52public:
54 std::uint_fast8_t schedCeil;
55
56#ifndef Q_UNSAFE
58#endif // ndef Q_UNSAFE
59
60#ifndef Q_UNSAFE
61 std::uint_fast8_t schedCeil_dis;
62#endif // ndef Q_UNSAFE
63}; // class Attr
64
65//${QV::QV-base::priv_} ......................................................
66extern QV::Attr priv_;
67
68//${QV::QV-base::schedDisable} ...............................................
69void schedDisable(std::uint_fast8_t const ceiling);
70
71//${QV::QV-base::schedEnable} ................................................
72void schedEnable();
73
74//${QV::QV-base::onIdle} .....................................................
75void onIdle();
76
77} // namespace QV
78} // namespace QP
79//$enddecl${QV::QV-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
81//============================================================================
82// interface used only for internal implementation, but not in applications
83#ifdef QP_IMPL
84
85//$declare${QV-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
86
87//${QV-impl::QF_SCHED_STAT_} .................................................
88#define QF_SCHED_STAT_
89
90//${QV-impl::QF_SCHED_LOCK_} .................................................
91#define QF_SCHED_LOCK_(dummy) (static_cast<void>(0))
92
93//${QV-impl::QF_SCHED_UNLOCK_} ...............................................
94#define QF_SCHED_UNLOCK_() (static_cast<void>(0))
95
96//${QV-impl::QACTIVE_EQUEUE_WAIT_} ...........................................
97#define QACTIVE_EQUEUE_WAIT_(me_) \
98 Q_ASSERT_INCRIT(310, (me_)->m_eQueue.m_frontEvt != nullptr)
99
100//${QV-impl::QACTIVE_EQUEUE_SIGNAL_} .........................................
101#ifndef Q_UNSAFE
102#define QACTIVE_EQUEUE_SIGNAL_(me_) \
103 QV::priv_.readySet.insert((me_)->m_prio); \
104 QV::priv_.readySet.update_(&QV::priv_.readySet_dis)
105#endif // ndef Q_UNSAFE
106
107//${QV-impl::QACTIVE_EQUEUE_SIGNAL_} .........................................
108#ifdef Q_UNSAFE
109#define QACTIVE_EQUEUE_SIGNAL_(me_) \
110 (QV::priv_.readySet.insert((me_)->m_prio))
111#endif // def Q_UNSAFE
112//$enddecl${QV-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113
114//$declare${QF_EPOOL-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
115
116//${QF_EPOOL-impl::QF_EPOOL_TYPE_} ...........................................
117#define QF_EPOOL_TYPE_ QMPool
118
119//${QF_EPOOL-impl::QF_EPOOL_INIT_} ...........................................
120#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
121 (p_).init((poolSto_), (poolSize_), (evtSize_))
122
123//${QF_EPOOL-impl::QF_EPOOL_EVENT_SIZE_} .....................................
124#define QF_EPOOL_EVENT_SIZE_(p_) ((p_).getBlockSize())
125
126//${QF_EPOOL-impl::QF_EPOOL_GET_} ............................................
127#define QF_EPOOL_GET_(p_, e_, m_, qsId_) \
128 ((e_) = static_cast<QEvt *>((p_).get((m_), (qsId_))))
129
130//${QF_EPOOL-impl::QF_EPOOL_PUT_} ............................................
131#define QF_EPOOL_PUT_(p_, e_, qsId_) ((p_).put((e_), (qsId_)))
132//$enddecl${QF_EPOOL-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133
134#endif // QP_IMPL
135
136#endif // QV_HPP_
Set of Active Objects of up to QF_MAX_ACTIVE elements.
Definition qp.hpp:610
Private attributes of the QV kernel.
Definition qv.hpp:51
QPSet readySet
Definition qv.hpp:53
QPSet readySet_dis
Definition qv.hpp:57
std::uint_fast8_t schedCeil
Definition qv.hpp:54
std::uint_fast8_t schedCeil_dis
Definition qv.hpp:61
QV::Attr priv_
Definition qv.cpp:76
void schedEnable()
Definition qv.cpp:106
void onIdle()
void schedDisable(std::uint_fast8_t const ceiling)
Definition qv.cpp:79
QP/C++ framework.
Definition qequeue.hpp:50