QP/C  8.0.0
Real-Time Embedded Framework
Loading...
Searching...
No Matches
qp_pkg.h
Go to the documentation of this file.
1//$file${include::qp_pkg.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2//
3// Model: qpc.qm
4// File: ${include::qp_pkg.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::qp_pkg.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35#ifndef QP_PKG_H_
36#define QP_PKG_H_
37
38//$declare${QF::QF-pkg} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
39
40//${QF::QF-pkg::Attr} ........................................................
41//! @class QF_Attr
42typedef struct {
43// private:
44
45#if (QF_MAX_EPOOL > 0U)
46 //! @private @memberof QF_Attr
48#endif // (QF_MAX_EPOOL > 0U)
49
50#if (QF_MAX_EPOOL > 0U)
51 //! @private @memberof QF_Attr
52 uint_fast8_t maxPool_;
53#endif // (QF_MAX_EPOOL > 0U)
54
55#if (QF_MAX_EPOOL == 0U)
56 //! @private @memberof QF_Attr
57 uint8_t dummy;
58#endif // (QF_MAX_EPOOL == 0U)
59} QF_Attr;
60
61//${QF::QF-pkg::priv_} .......................................................
62//! @static @private @memberof QF
64
65//${QF::QF-pkg::bzero_} ......................................................
66//! @static @private @memberof QF
67void QF_bzero_(
68 void * const start,
69 uint_fast16_t const len);
70//$enddecl${QF::QF-pkg} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71
72// Bitmasks are for the QTimeEvt::flags attribute
73#define QTE_FLAG_IS_LINKED (1U << 7U)
74#define QTE_FLAG_WAS_DISARMED (1U << 6U)
75
76//! @private @memberof QEvt
77static inline void QEvt_refCtr_inc_(QEvt const *me) {
78 uint8_t rc = me->refCtr_ + 1U;
79 ((QEvt *)me)->refCtr_ = rc; // cast away 'const'
80#ifndef Q_UNSAFE
81 ((QEvt *)me)->evtTag_ = (me->evtTag_ & 0xF0U) | ((~rc) & 0x0FU);
82#endif // ndef Q_UNSAFE
83}
84
85//! @private @memberof QEvt
86static inline void QEvt_refCtr_dec_(QEvt const *me) {
87 uint8_t rc = me->refCtr_ - 1U;
88 ((QEvt *)me)->refCtr_ = rc; // cast away 'const'
89#ifndef Q_UNSAFE
90 ((QEvt *)me)->evtTag_ = (me->evtTag_ & 0xF0U) | ((~rc) & 0x0FU);
91#endif // ndef Q_UNSAFE
92}
93
94#define QACTIVE_CAST_(ptr_) ((QActive *)(ptr_))
95#define Q_PTR2UINT_CAST_(ptr_) ((uintptr_t)(ptr_))
96
97#endif // QP_PKG_H_
QF_Attr QF_priv_
Definition qp_pkg.h:63
#define QF_EPOOL_TYPE_
Definition qk.h:188
#define QF_MAX_EPOOL
Maximum # event pools in the system (0..15)
Definition qp_config.h:133
Event class.
Definition qp.h:131
uint8_t evtTag_
Event "tag" contains pool-ID plus the Duplicate Inverted Storage of the QEvt::refCtr_.
Definition qp.h:140
uint8_t volatile refCtr_
Event reference counter.
Definition qp.h:143
static void QEvt_refCtr_dec_(QEvt const *me)
Definition qp_pkg.h:86
static void QEvt_refCtr_inc_(QEvt const *me)
Definition qp_pkg.h:77
Private attributes of the QF framework.
Definition qp_pkg.h:42
uint_fast8_t maxPool_
Definition qp_pkg.h:52