qpc/include/qv.h

155 lines
5.4 KiB
C
Raw Normal View History

//$file${include::qv.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//
// Model: qpc.qm
// File: ${include::qv.h}
//
2024-01-30 20:48:12 -05:00
// This code has been generated by QM 6.1.1 <www.state-machine.com/qm>.
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
// This code is covered by the following QP license:
// License # : LicenseRef-QL-dual
// Issued to : Any user of the QP/C real-time embedded framework
// Framework(s) : qpc
// Support ends : 2024-12-31
// License scope:
//
// Copyright (C) 2005 Quantum Leaps, LLC <state-machine.com>.
//
// Q u a n t u m L e a P s
// ------------------------
// Modern Embedded Software
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com/licensing>
// <info@state-machine.com>
//
//$endhead${include::qv.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#ifndef QV_H_
#define QV_H_
//$declare${QV::QV} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${QV::QV} ..................................................................
//! @class QV
typedef struct QV {
//! @cond INTERNAL
uint8_t dummy;
//! @endcond
} QV;
//$enddecl${QV::QV} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$declare${QV::QV-base} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${QV::QV-base::Attr} .......................................................
//! @class QV_Attr
typedef struct {
// private:
//! @memberof QV_Attr
QPSet readySet;
//! @memberof QV_Attr
uint_fast8_t schedCeil;
#ifndef Q_UNSAFE
//! @memberof QV_Attr
QPSet readySet_dis;
#endif // ndef Q_UNSAFE
#ifndef Q_UNSAFE
//! @memberof QV_Attr
uint_fast8_t schedCeil_dis;
#endif // ndef Q_UNSAFE
} QV_Attr;
//${QV::QV-base::priv_} ......................................................
//! @static @private @memberof QV
extern QV_Attr QV_priv_;
//${QV::QV-base::schedDisable} ...............................................
//! @static @public @memberof QV
void QV_schedDisable(uint_fast8_t const ceiling);
//${QV::QV-base::schedEnable} ................................................
//! @static @public @memberof QV
void QV_schedEnable(void);
//${QV::QV-base::onIdle} .....................................................
//! @static @public @memberof QV
2015-04-28 13:45:35 -04:00
void QV_onIdle(void);
//$enddecl${QV::QV-base} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2014-04-06 11:43:13 -04:00
//============================================================================
// interface used only for internal implementation, but not in applications
2014-04-06 11:43:13 -04:00
#ifdef QP_IMPL
//$declare${QV-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
//${QV-impl::QF_SCHED_STAT_} .................................................
#define QF_SCHED_STAT_
//${QV-impl::QF_SCHED_LOCK_} .................................................
#define QF_SCHED_LOCK_(dummy) ((void)0)
//${QV-impl::QF_SCHED_UNLOCK_} ...............................................
#define QF_SCHED_UNLOCK_() ((void)0)
//${QV-impl::QACTIVE_EQUEUE_WAIT_} ...........................................
#define QACTIVE_EQUEUE_WAIT_(me_) \
Q_ASSERT_INCRIT(310, (me_)->eQueue.frontEvt != (QEvt *)0)
//${QV-impl::QACTIVE_EQUEUE_SIGNAL_} .........................................
#ifndef Q_UNSAFE
#define QACTIVE_EQUEUE_SIGNAL_(me_) \
QPSet_insert(&QV_priv_.readySet, (uint_fast8_t)(me_)->prio); \
QPSet_update_(&QV_priv_.readySet, &QV_priv_.readySet_dis)
#endif // ndef Q_UNSAFE
2014-04-06 11:43:13 -04:00
//${QV-impl::QACTIVE_EQUEUE_SIGNAL_} .........................................
#ifdef Q_UNSAFE
#define QACTIVE_EQUEUE_SIGNAL_(me_) \
QPSet_insert(&QV_priv_.readySet, (uint_fast8_t)(me_)->prio)
#endif // def Q_UNSAFE
//$enddecl${QV-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$declare${QF_EPOOL-impl} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2016-03-30 18:50:33 -04:00
//${QF_EPOOL-impl::QF_EPOOL_TYPE_} ...........................................
#define QF_EPOOL_TYPE_ QMPool
2012-08-14 18:07:04 -04:00
//${QF_EPOOL-impl::QF_EPOOL_INIT_} ...........................................
#define QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) \
(QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_)))
2016-09-23 12:08:21 -04:00
//${QF_EPOOL-impl::QF_EPOOL_EVENT_SIZE_} .....................................
#define QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize)
2013-09-23 14:34:35 -04:00
//${QF_EPOOL-impl::QF_EPOOL_GET_} ............................................
2024-01-30 20:48:12 -05:00
#define QF_EPOOL_GET_(p_, e_, m_, qsId_) \
((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qsId_)))
2012-08-14 18:07:04 -04:00
//${QF_EPOOL-impl::QF_EPOOL_PUT_} ............................................
2024-01-30 20:48:12 -05:00
#define QF_EPOOL_PUT_(p_, e_, qsId_) \
(QMPool_put(&(p_), (e_), (qsId_)))
//$enddecl${QF_EPOOL-impl} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#endif // QP_IMPL
2012-08-14 18:07:04 -04:00
#endif // QV_H_