Assert 250 upon semaphone wait timeout
Real-Time Event Frameworks based on active objects & state machines
Brought to you by:
quantum-leaps
In qxk_sema.cpp, line 153,
// did the blocking time-out? (signal of zero means that it did)
if (curr->m_timeEvt.sig != static_cast<qsignal>(0)) {</qsignal>
The code does NOT agree with the comment. Checking how the m_timeEvt.sig is used in QP, it looks like the comment is correct. For example, there is a similar code in qxk_mutex.cpp and it looks like it's correct there.
This issue was found when running 6.5.1. The source code of the latest 6.8.1 indicates that it is still an issue.
Anonymous
Thank you for reporting. The bug is the reversed condition tested in
qxk_sema.cpp:153. Here is the patch to fix this:The bug has been fixed in the QP/C++ git repositories (on GitHub and SourceForge). The QP-bundle will be fixed in the next release.
NOTE: this bug is NOT present in QP/C, where the corresponding code is correct.
--MMS
Last edit: Quantum Leaps 2020-06-15
Fixed in QP/C++ 6.8.2.
--MMS