From 0e96b2ec29fde1e56e12fc9f0dceb80012e0caf3 Mon Sep 17 00:00:00 2001 From: dario Date: Sat, 28 Oct 2023 20:12:27 +0200 Subject: [PATCH] Renamed checkTerminationRequest to avoid confusion about the actual behavior --- include/sta/rtos/thread.hpp | 6 ++++-- src/thread.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/sta/rtos/thread.hpp b/include/sta/rtos/thread.hpp index 713cf0b..5490026 100644 --- a/include/sta/rtos/thread.hpp +++ b/include/sta/rtos/thread.hpp @@ -104,9 +104,11 @@ namespace sta void requestTermination(); /** - * @brief Returns true if this thread was requested to terminate. + * @brief Resets the terminate bool to false. + * + * @return Returns the previous value of this variable. */ - bool checkTerminationRequest(); + bool resetTerminationRequest(); /** * @brief Forcibly terminate thread. diff --git a/src/thread.cpp b/src/thread.cpp index 4c54e92..a4b95a1 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -54,7 +54,7 @@ namespace sta terminate_ = true; } - bool RtosThread::checkTerminationRequest() + bool RtosThread::resetTerminationRequest() { bool temp = terminate_; terminate_ = false;