mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-06-12 10:45:58 +00:00
Fixes for termination requests
This commit is contained in:
parent
ca2ffc853c
commit
8cebc8800a
@ -105,12 +105,17 @@ namespace sta
|
|||||||
*/
|
*/
|
||||||
void requestTermination();
|
void requestTermination();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear the termination request flag for this thread.
|
||||||
|
*/
|
||||||
|
void deleteTerminationRequest();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Resets the terminate bool to false.
|
* @brief Resets the terminate bool to false.
|
||||||
*
|
*
|
||||||
* @return Returns the previous value of this variable.
|
* @return Returns the previous value of this variable.
|
||||||
*/
|
*/
|
||||||
bool resetTerminationRequest();
|
bool isTerminationRequested();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Forcibly terminate thread.
|
* @brief Forcibly terminate thread.
|
||||||
|
@ -8,11 +8,13 @@
|
|||||||
namespace sta
|
namespace sta
|
||||||
{
|
{
|
||||||
RtosThread::RtosThread()
|
RtosThread::RtosThread()
|
||||||
: handle_(nullptr)
|
: handle_(nullptr),
|
||||||
|
terminate_{false}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
RtosThread::RtosThread(const Handle & handle)
|
RtosThread::RtosThread(const Handle & handle)
|
||||||
: handle_{handle}
|
: handle_{handle},
|
||||||
|
terminate_{false}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -59,16 +61,17 @@ namespace sta
|
|||||||
|
|
||||||
void RtosThread::requestTermination()
|
void RtosThread::requestTermination()
|
||||||
{
|
{
|
||||||
// sysNotify(STA_RTOS_THREAD_FLAG_TERMINATE);
|
|
||||||
terminate_ = true;
|
terminate_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RtosThread::resetTerminationRequest()
|
void RtosThread::deleteTerminationRequest()
|
||||||
{
|
{
|
||||||
bool temp = terminate_;
|
|
||||||
terminate_ = false;
|
terminate_ = false;
|
||||||
|
}
|
||||||
|
|
||||||
return temp;
|
bool RtosThread::isTerminationRequested()
|
||||||
|
{
|
||||||
|
return terminate_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RtosThread::terminate()
|
void RtosThread::terminate()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user