From 0007c4e126c5313011f9c11251828422ba604655 Mon Sep 17 00:00:00 2001 From: MMS Date: Fri, 7 Oct 2022 11:51:33 -0400 Subject: [PATCH] 7.1.2 --- qpcpp.qm | 5 ++++- src/qxk/qxk.cpp | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/qpcpp.qm b/qpcpp.qm index 15182ba0..a8ffbb40 100644 --- a/qpcpp.qm +++ b/qpcpp.qm @@ -12039,9 +12039,12 @@ return curr; //! return with interrupts **disabled**. - std::uint8_t const prev_prio = (QXK_attr_.prev != nullptr) + #ifdef Q_SPY +std::uint8_t const prev_prio = (QXK_attr_.prev != nullptr) ? QXK_attr_.prev->m_prio : 0U; +#endif // Q_SPY + std::uint8_t const next_prio = (next != nullptr) ? next->m_prio : QXK_attr_.actPrio; diff --git a/src/qxk/qxk.cpp b/src/qxk/qxk.cpp index 210c2526..8f9bf193 100644 --- a/src/qxk/qxk.cpp +++ b/src/qxk/qxk.cpp @@ -453,9 +453,12 @@ QP::QActive * QXK_current() noexcept { //${QXK-extern-C::QXK_contextSw} ............................................. #if defined(Q_SPY) || defined(QXK_ON_CONTEXT_SW) void QXK_contextSw(QP::QActive * const next) { + #ifdef Q_SPY std::uint8_t const prev_prio = (QXK_attr_.prev != nullptr) ? QXK_attr_.prev->m_prio : 0U; + #endif // Q_SPY + std::uint8_t const next_prio = (next != nullptr) ? next->m_prio : QXK_attr_.actPrio;