#include <StdCppThreadFactory.h>
◆ StdCppThread()
StdCppOSWrapper::StdCppThreadFactory::StdCppThread::StdCppThread |
( |
OSWrapper::Runnable * |
r, |
|
|
int |
priority, |
|
|
std::size_t |
stackSize, |
|
|
const char * |
name |
|
) |
| |
◆ ~StdCppThread()
virtual StdCppOSWrapper::StdCppThreadFactory::StdCppThread::~StdCppThread |
( |
| ) |
|
|
inlinevirtual |
◆ beginThread()
void StdCppOSWrapper::StdCppThreadFactory::StdCppThread::beginThread |
( |
| ) |
|
◆ endThread()
void StdCppOSWrapper::StdCppThreadFactory::StdCppThread::endThread |
( |
| ) |
|
◆ getId()
std::thread::id StdCppOSWrapper::StdCppThreadFactory::StdCppThread::getId |
( |
| ) |
const |
|
inline |
◆ getInitialPriority()
int StdCppOSWrapper::StdCppThreadFactory::StdCppThread::getInitialPriority |
( |
| ) |
const |
|
virtual |
Get this thread priority when this thread was created.
- Returns
- Initial thread priority
Implements OSWrapper::Thread.
◆ getName()
const char * StdCppOSWrapper::StdCppThreadFactory::StdCppThread::getName |
( |
| ) |
const |
|
virtual |
◆ getNativeHandle()
void * StdCppOSWrapper::StdCppThreadFactory::StdCppThread::getNativeHandle |
( |
| ) |
|
|
virtual |
Get the native handle of RTOS's thread.
- Returns
- native handle
Implements OSWrapper::Thread.
◆ getPriority()
int StdCppOSWrapper::StdCppThreadFactory::StdCppThread::getPriority |
( |
| ) |
const |
|
virtual |
◆ getStackSize()
std::size_t StdCppOSWrapper::StdCppThreadFactory::StdCppThread::getStackSize |
( |
| ) |
const |
|
virtual |
◆ isFinished()
bool StdCppOSWrapper::StdCppThreadFactory::StdCppThread::isFinished |
( |
| ) |
const |
|
virtual |
Return true if this thread is in the FINISHED state.
- Return values
-
true | This thread is in the FINISHED state |
false | This thread is not in the FINISHED state |
Implements OSWrapper::Thread.
◆ setName()
void StdCppOSWrapper::StdCppThreadFactory::StdCppThread::setName |
( |
const char * |
name | ) |
|
|
virtual |
◆ setPriority()
void StdCppOSWrapper::StdCppThreadFactory::StdCppThread::setPriority |
( |
int |
priority | ) |
|
|
virtual |
◆ start()
void StdCppOSWrapper::StdCppThreadFactory::StdCppThread::start |
( |
| ) |
|
|
virtual |
Transit this thread to the READY state.
After this method, when this thread transits to the RUNNING state, this thread calls Runnable::run() specified at create().
- Note
- If this thread is already in the READY state, do nothing.
-
If this thread is finished, you can start() again.
Implements OSWrapper::Thread.
◆ timedWait()
Block the current thread until this thread transits to the FINISHED state but only within the limited time.
- Parameters
-
- Return values
-
OK | Success. This thread is in the FINISHED state |
TimedOut | The limited time was elapsed |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
- Note
- If tmout is Timeout::POLLING then this method queries the state without blocking.
-
If tmout is Timeout::FOREVER then this method waits forever until the condition is satisfied.
Implements OSWrapper::Thread.
◆ tryWait()
OSWrapper::Error StdCppOSWrapper::StdCppThreadFactory::StdCppThread::tryWait |
( |
| ) |
|
|
virtual |
Query without blocking whether this thread is in the FINISHED state.
- Return values
-
OK | This thread is already in the FINISHED state |
TimedOut | This thread is not in the FINISHED state |
- Note
- Same as timedWait(Timeout::POLLING)
Implements OSWrapper::Thread.
◆ wait()
Block the current thread until this thread transits to the FINISHED state.
- Return values
-
OK | Success. This thread is in the FINISHED state |
CalledByNonThread | Called from non thread context (interrupt handler, timer, etc) |
- Note
- Same as timedWait(Timeout::FOREVER)
Implements OSWrapper::Thread.
◆ m_initialPriority
int StdCppOSWrapper::StdCppThreadFactory::StdCppThread::m_initialPriority |
|
protected |
◆ m_mutex
std::mutex StdCppOSWrapper::StdCppThreadFactory::StdCppThread::m_mutex |
|
mutableprotected |
◆ m_name
const char* StdCppOSWrapper::StdCppThreadFactory::StdCppThread::m_name |
|
protected |
◆ m_priority
int StdCppOSWrapper::StdCppThreadFactory::StdCppThread::m_priority |
|
protected |
◆ m_stackSize
std::size_t StdCppOSWrapper::StdCppThreadFactory::StdCppThread::m_stackSize |
|
protected |
◆ m_thread
std::thread StdCppOSWrapper::StdCppThreadFactory::StdCppThread::m_thread |
|
protected |
The documentation for this class was generated from the following files: