QP/C  7.3.4
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qv.h
Go to the documentation of this file.
1//$file${include::qv.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2//
3// Model: qpc.qm
4// File: ${include::qv.h}
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) : qpc
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.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43#ifndef QV_H_
44#define QV_H_
45
46//$declare${QV::QV} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
47
48//${QV::QV} ..................................................................
49//! @class QV
50typedef struct QV {
51 //! @cond INTERNAL
52 uint8_t dummy;
53 //! @endcond
54} QV;
55//$enddecl${QV::QV} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
57//$declare${QV::QV-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
58
59//${QV::QV-base::Attr} .......................................................
60//! @class QV_Attr
61typedef struct {
62// private:
63
64 //! @memberof QV_Attr
66
67 //! @memberof QV_Attr
68 uint_fast8_t schedCeil;
69
70#ifndef Q_UNSAFE
71 //! @memberof QV_Attr
73#endif // ndef Q_UNSAFE
74
75#ifndef Q_UNSAFE
76 //! @memberof QV_Attr
77 uint_fast8_t schedCeil_dis;
78#endif // ndef Q_UNSAFE
79} QV_Attr;
80
81//${QV::QV-base::priv_} ......................................................
82//! @static @private @memberof QV
84
85//${QV::QV-base::schedDisable} ...............................................
86//! @static @public @memberof QV
87void QV_schedDisable(uint_fast8_t const ceiling);
88
89//${QV::QV-base::schedEnable} ................................................
90//! @static @public @memberof QV
91void QV_schedEnable(void);
92
93//${QV::QV-base::onIdle} .....................................................
94//! @static @public @memberof QV
95void QV_onIdle(void);
96//$enddecl${QV::QV-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97
98//============================================================================
99// interface used only for internal implementation, but not in applications
100#ifdef QP_IMPL
101
102//$declare${QV-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
103
104//${QV-impl::QF_SCHED_STAT_} .................................................
105#define QF_SCHED_STAT_
106
107//${QV-impl::QF_SCHED_LOCK_} .................................................
108#define QF_SCHED_LOCK_(dummy) ((void)0)
109
110//${QV-impl::QF_SCHED_UNLOCK_} ...............................................
111#define QF_SCHED_UNLOCK_() ((void)0)
112
113//${QV-impl::QACTIVE_EQUEUE_WAIT_} ...........................................
114#define QACTIVE_EQUEUE_WAIT_(me_) \
115 Q_ASSERT_INCRIT(310, (me_)->eQueue.frontEvt != (QEvt *)0)
116
117//${QV-impl::QACTIVE_EQUEUE_SIGNAL_} .........................................
118#ifndef Q_UNSAFE
119#define QACTIVE_EQUEUE_SIGNAL_(me_) \
120 QPSet_insert(&QV_priv_.readySet, (uint_fast8_t)(me_)->prio); \
121 QPSet_update_(&QV_priv_.readySet, &QV_priv_.readySet_dis)
122#endif // ndef Q_UNSAFE
123
124//${QV-impl::QACTIVE_EQUEUE_SIGNAL_} .........................................
125#ifdef Q_UNSAFE
126#define QACTIVE_EQUEUE_SIGNAL_(me_) \
127 QPSet_insert(&QV_priv_.readySet, (uint_fast8_t)(me_)->prio)
128#endif // def Q_UNSAFE
129//$enddecl${QV-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130
131//$declare${QF_EPOOL-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
132
133//${QF_EPOOL-impl::QF_EPOOL_TYPE_} ...........................................
134#define QF_EPOOL_TYPE_ QMPool
135
136//${QF_EPOOL-impl::QF_EPOOL_INIT_} ...........................................
137#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
138 (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_)))
139
140//${QF_EPOOL-impl::QF_EPOOL_EVENT_SIZE_} .....................................
141#define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize)
142
143//${QF_EPOOL-impl::QF_EPOOL_GET_} ............................................
144#define QF_EPOOL_GET_(p_, e_, m_, qsId_) \
145 ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qsId_)))
146
147//${QF_EPOOL-impl::QF_EPOOL_PUT_} ............................................
148#define QF_EPOOL_PUT_(p_, e_, qsId_) \
149 (QMPool_put(&(p_), (e_), (qsId_)))
150//$enddecl${QF_EPOOL-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
151
152#endif // QP_IMPL
153
154#endif // QV_H_
Set of Active Objects of up to QF_MAX_ACTIVE elements.
Definition qp.h:658
Private attributes of the QV kernel.
Definition qv.h:61
QPSet readySet_dis
Definition qv.h:72
uint_fast8_t schedCeil
Definition qv.h:68
uint_fast8_t schedCeil_dis
Definition qv.h:77
QPSet readySet
Definition qv.h:65
QV non-preemptive, cooperative kernel (QV namespace emulated as a "class" in C)
Definition qv.h:50
void QV_onIdle(void)
QV_Attr QV_priv_
Definition qv.h:83
void QV_schedDisable(uint_fast8_t const ceiling)