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