distortos
v0.7.0
object-oriented C++ RTOS for microcontrollers
|
Synchronization-related API of distortos. More...
Modules | |
Queues | |
Queues-related synchronization API of distortos. | |
Signals | |
Signals-related synchronization API of distortos. | |
Classes | |
class | distortos::ConditionVariable |
ConditionVariable is an advanced synchronization primitive. More... | |
class | distortos::Mutex |
Mutex is the basic synchronization primitive. More... | |
class | distortos::OnceFlag |
OnceFlag is a helper class for callOnce(). More... | |
class | distortos::Semaphore |
Semaphore is the basic synchronization primitive. More... | |
Functions | |
template<typename Function , typename... Args> | |
void | distortos::callOnce (OnceFlag &onceFlag, Function &&function, Args &&... args) |
Executes the callable object exactly once, even if called from multiple threads. More... | |
int | distortos::DynamicThread::join () override |
Waits for thread termination. More... | |
int | distortos::internal::ThreadCommon::join () override |
Waits for thread termination. More... | |
virtual int | distortos::Thread::join ()=0 |
Waits for thread termination. More... | |
Synchronization-related API of distortos.
void distortos::callOnce | ( | OnceFlag & | onceFlag, |
Function && | function, | ||
Args &&... | args | ||
) |
Executes the callable object exactly once, even if called from multiple threads.
Similar to std::call_once() - http://en.cppreference.com/w/cpp/thread/call_once Similar to POSIX pthread_once() - http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_once.html#
Function | is the function object that will be executed |
Args | are the arguments for Function |
[in] | onceFlag | is a reference to shared OnceFlag object |
[in] | function | is the function object that will be executed |
[in] | args | are arguments for function |
|
overridevirtual |
Waits for thread termination.
Similar to std::thread::join() - http://en.cppreference.com/w/cpp/thread/thread/join Similar to POSIX pthread_join() - http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_join.html
Blocks current thread until this thread finishes its execution. The results of multiple simultaneous calls to join() on the same target thread are undefined.
Implements distortos::Thread.
|
pure virtual |
Waits for thread termination.
Similar to std::thread::join() - http://en.cppreference.com/w/cpp/thread/thread/join Similar to POSIX pthread_join() - http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_join.html
Blocks current thread until this thread finishes its execution. The results of multiple simultaneous calls to join() on the same target thread are undefined.
Implemented in distortos::DynamicThread, and distortos::internal::ThreadCommon.
|
overridevirtual |
Waits for thread termination.
Similar to std::thread::join() - http://en.cppreference.com/w/cpp/thread/thread/join Similar to POSIX pthread_join() - http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_join.html
Blocks current thread until this thread finishes its execution. The results of multiple simultaneous calls to join() on the same target thread are undefined.
Implements distortos::Thread.