Added method for reading thread flags

This commit is contained in:
dario 2023-10-15 22:13:25 +02:00
parent cf5466fe55
commit d591560c95
2 changed files with 11 additions and 0 deletions

View File

@ -81,6 +81,11 @@ namespace sta
*/
void notify(uint32_t flags);
/**
* @return Returns the flags that were set for this thread.
*/
uint32_t getFlags();
/**
* @brief Send termination request to thread.
*/

View File

@ -32,6 +32,12 @@ namespace sta
osThreadFlagsSet(handle_.get(), flags);
}
uint32_t RtosThread::getFlags()
{
STA_ASSERT(handle_.get() != nullptr);
return osThreadFlagsGet();
}
void RtosThread::requestTermination()
{