QP/C++
8.0.4
Real-Time Event Framework
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
namespace
QP
{
33
namespace
QV
{
34
35
//============================================================================
36
class
Attr
{
37
public
:
38
QPSet
readySet
;
39
std::uint8_t
schedCeil
;
40
};
// class Attr
41
42
extern
QV::Attr
priv_
;
43
44
void
schedDisable
(std::uint_fast8_t
const
ceiling);
45
46
void
schedEnable
();
47
48
void
onIdle
();
49
50
}
// namespace QV
51
}
// namespace QP
52
53
//============================================================================
54
// interface used only for internal implementation, but not in applications
55
#ifdef QP_IMPL
56
57
// scheduler locking for QV (not needed)...
58
#define QF_SCHED_STAT_
59
#define QF_SCHED_LOCK_(dummy) (static_cast<void>(0))
60
#define QF_SCHED_UNLOCK_() (static_cast<void>(0))
61
62
// QActive event queue customization for QV...
63
#define QACTIVE_EQUEUE_WAIT_(me_) (static_cast<void>(0))
64
#define QACTIVE_EQUEUE_SIGNAL_(me_) \
65
(QV::priv_.readySet.insert((me_)->m_prio))
66
67
// QF event pool customization for QV...
68
#define QF_EPOOL_TYPE_ QMPool
69
#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
70
(p_).init((poolSto_), (poolSize_), (evtSize_))
71
#define QF_EPOOL_EVENT_SIZE_(p_) ((p_).getBlockSize())
72
#define QF_EPOOL_GET_(p_, e_, m_, qsId_) \
73
((e_) = static_cast<QEvt *>((p_).get((m_), (qsId_))))
74
#define QF_EPOOL_PUT_(p_, e_, qsId_) ((p_).put((e_), (qsId_)))
75
76
#endif
// QP_IMPL
77
78
#endif
// QV_HPP_
QP::QPSet
Set of Active Objects of up to QF_MAX_ACTIVE elements.
Definition
qp.hpp:475
QP::QV::Attr
Private attributes of the QV kernel.
Definition
qv.hpp:36
QP::QV::Attr::readySet
QPSet readySet
Definition
qv.hpp:38
QP::QV::Attr::schedCeil
std::uint8_t schedCeil
Definition
qv.hpp:39
QP::QV
non-preemptive kernel
Definition
qv.hpp:33
QP::QV::priv_
QV::Attr priv_
Definition
qv.cpp:53
QP::QV::schedEnable
void schedEnable()
Definition
qv.cpp:75
QP::QV::onIdle
void onIdle()
QP::QV::schedDisable
void schedDisable(std::uint_fast8_t const ceiling)
Definition
qv.cpp:56
QP
QP/C++ framework.
Definition
qequeue.hpp:36
qpcpp
include
qv.hpp
© 2005-2025 Quantum Leaps
|
Using Online Help
|
QP/C++ 8.0.4
| created with
Spexygen
© 2005-2025 Quantum Leaps
|
Using Online Help
|
QP/C++ 8.0.4
| created with
Spexygen