QP/C++  8.0.0
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 7.0.0 <www.state-machine.com/qm>.
7// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
8//
9// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
10//
11// Q u a n t u m L e a P s
12// ------------------------
13// Modern Embedded Software
14//
15// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
16//
17// The QP/C++ software is dual-licensed under the terms of the open-source
18// GNU General Public License (GPL) or under the terms of one of the closed-
19// source Quantum Leaps commercial licenses.
20//
21// Redistributions in source code must retain this top-level comment block.
22// Plagiarizing this software to sidestep the license obligations is illegal.
23//
24// NOTE:
25// The GPL does NOT permit the incorporation of this code into proprietary
26// programs. Please contact Quantum Leaps for commercial licensing options,
27// which expressly supersede the GPL and are designed explicitly for
28// closed-source distribution.
29//
30// Quantum Leaps contact information:
31// <www.state-machine.com/licensing>
32// <info@state-machine.com>
33//
34//$endhead${include::qv.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35#ifndef QV_HPP_
36#define QV_HPP_
37
38//$declare${QV::QV-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
39namespace QP {
40namespace QV {
41
42//${QV::QV-base::Attr} .......................................................
43class Attr {
44public:
46 std::uint_fast8_t schedCeil;
47
48#ifndef Q_UNSAFE
50#endif // ndef Q_UNSAFE
51
52#ifndef Q_UNSAFE
53 std::uint_fast8_t schedCeil_dis;
54#endif // ndef Q_UNSAFE
55}; // class Attr
56
57//${QV::QV-base::priv_} ......................................................
58extern QV::Attr priv_;
59
60//${QV::QV-base::schedDisable} ...............................................
61void schedDisable(std::uint_fast8_t const ceiling);
62
63//${QV::QV-base::schedEnable} ................................................
64void schedEnable();
65
66//${QV::QV-base::onIdle} .....................................................
67void onIdle();
68
69} // namespace QV
70} // namespace QP
71//$enddecl${QV::QV-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
73//============================================================================
74// interface used only for internal implementation, but not in applications
75#ifdef QP_IMPL
76
77//$declare${QV-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
78
79//${QV-impl::QF_SCHED_STAT_} .................................................
80#define QF_SCHED_STAT_
81
82//${QV-impl::QF_SCHED_LOCK_} .................................................
83#define QF_SCHED_LOCK_(dummy) (static_cast<void>(0))
84
85//${QV-impl::QF_SCHED_UNLOCK_} ...............................................
86#define QF_SCHED_UNLOCK_() (static_cast<void>(0))
87
88//${QV-impl::QACTIVE_EQUEUE_WAIT_} ...........................................
89#define QACTIVE_EQUEUE_WAIT_(me_) (static_cast<void>(0))
90
91//${QV-impl::QACTIVE_EQUEUE_SIGNAL_} .........................................
92#ifndef Q_UNSAFE
93#define QACTIVE_EQUEUE_SIGNAL_(me_) \
94 QV::priv_.readySet.insert((me_)->m_prio); \
95 QV::priv_.readySet.update_(&QV::priv_.readySet_dis)
96#endif // ndef Q_UNSAFE
97
98//${QV-impl::QACTIVE_EQUEUE_SIGNAL_} .........................................
99#ifdef Q_UNSAFE
100#define QACTIVE_EQUEUE_SIGNAL_(me_) \
101 (QV::priv_.readySet.insert((me_)->m_prio))
102#endif // def Q_UNSAFE
103//$enddecl${QV-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104
105//$declare${QF_EPOOL-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
106
107//${QF_EPOOL-impl::QF_EPOOL_TYPE_} ...........................................
108#define QF_EPOOL_TYPE_ QMPool
109
110//${QF_EPOOL-impl::QF_EPOOL_INIT_} ...........................................
111#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
112 (p_).init((poolSto_), (poolSize_), (evtSize_))
113
114//${QF_EPOOL-impl::QF_EPOOL_EVENT_SIZE_} .....................................
115#define QF_EPOOL_EVENT_SIZE_(p_) ((p_).getBlockSize())
116
117//${QF_EPOOL-impl::QF_EPOOL_GET_} ............................................
118#define QF_EPOOL_GET_(p_, e_, m_, qsId_) \
119 ((e_) = static_cast<QEvt *>((p_).get((m_), (qsId_))))
120
121//${QF_EPOOL-impl::QF_EPOOL_PUT_} ............................................
122#define QF_EPOOL_PUT_(p_, e_, qsId_) ((p_).put((e_), (qsId_)))
123//$enddecl${QF_EPOOL-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124
125#endif // QP_IMPL
126
127#endif // QV_HPP_
Set of Active Objects of up to QF_MAX_ACTIVE elements.
Definition qp.hpp:572
Private attributes of the QV kernel.
Definition qv.hpp:43
QPSet readySet
Definition qv.hpp:45
QPSet readySet_dis
Definition qv.hpp:49
std::uint_fast8_t schedCeil
Definition qv.hpp:46
std::uint_fast8_t schedCeil_dis
Definition qv.hpp:53
QV::Attr priv_
Definition qv.cpp:67
void schedEnable()
Definition qv.cpp:97
void onIdle()
void schedDisable(std::uint_fast8_t const ceiling)
Definition qv.cpp:70
QP/C++ framework.
Definition qequeue.hpp:42