QP/C  8.0.2
Real-Time Event Framework
Loading...
Searching...
No Matches
qv.h
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_H_
30#define QV_H_
31
32//============================================================================
33//! @class QV
34typedef struct QV {
35 //! @cond INTERNAL
36 uint8_t dummy;
37 //! @endcond
38} QV;
39
40//============================================================================
41//! @class QV_Attr
42typedef struct {
43 QPSet readySet; //!< @private @memberof QV_Attr
44 uint_fast8_t schedCeil; //!< @private @memberof QV_Attr
45} QV_Attr;
46
47//! @static @private @memberof QV
49
50//! @static @public @memberof QV
51void QV_schedDisable(uint_fast8_t const ceiling);
52
53//! @static @public @memberof QV
54void QV_schedEnable(void);
55
56//! @static @public @memberof QV
57void QV_onIdle(void);
58
59//============================================================================
60// interface used only for internal implementation, but not in applications
61#ifdef QP_IMPL
62
63// scheduler locking for QV (not needed)...
64#define QF_SCHED_STAT_
65#define QF_SCHED_LOCK_(dummy) ((void)0)
66#define QF_SCHED_UNLOCK_() ((void)0)
67
68// QActive event queue customization for QV...
69#define QACTIVE_EQUEUE_WAIT_(me_) ((void)0)
70#define QACTIVE_EQUEUE_SIGNAL_(me_) \
71 QPSet_insert(&QV_priv_.readySet, (uint_fast8_t)(me_)->prio)
72
73// QF event pool customization for QV...
74#define QF_EPOOL_TYPE_ QMPool
75#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
76 (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_)))
77#define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize)
78#define QF_EPOOL_GET_(p_, e_, m_, qsId_) \
79 ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qsId_)))
80#define QF_EPOOL_PUT_(p_, e_, qsId_) (QMPool_put(&(p_), (e_), (qsId_)))
81
82#endif // QP_IMPL
83
84#endif // QV_H_
Set of Active Objects of up to QF_MAX_ACTIVE elements.
Definition qp.h:408
Private attributes of the QV kernel.
Definition qv.h:42
QPSet readySet
Definition qv.h:43
uint_fast8_t schedCeil
Definition qv.h:44
QV non-preemptive kernel (QV namespace emulated as a "class" in C)
Definition qv.h:34
void QV_onIdle(void)
void QV_schedEnable(void)
Definition qv.c:72
void QV_schedDisable(uint_fast8_t const ceiling)
QV_Attr QV_priv_
Definition qv.h:48