|
zpp
Zephyr C++20 Framework
|
provide functions that access the current thread of execution. More...
Functions | |
| auto | get_id () noexcept |
| Get the thread ID of the current thread. More... | |
| void | yield () noexcept |
| Yield the current thread. More... | |
| template<class T_Rep , class T_Period > | |
| void | busy_wait_for (const std::chrono::duration< T_Rep, T_Period > &wait_duration) |
| Busy wait for a specified time duration. More... | |
| template<class T_Rep , class T_Period > | |
| auto | sleep_for (const std::chrono::duration< T_Rep, T_Period > &sleep_duration) |
| Suspend the current thread for a specified time duration. More... | |
| template<class T_Clock , class T_Duration > | |
| void | sleep_until (const std::chrono::time_point< T_Clock, T_Duration > &sleep_time) |
| Suspend the current thread until a specified time point. More... | |
| void | abort () noexcept |
| Abort the current thread. More... | |
| void | suspend () noexcept |
| Suspend the current thread. More... | |
| thread_prio | get_priority () noexcept |
| Get the current thread's priority. More... | |
| void | set_priority (thread_prio prio) noexcept |
| Set the current thread's priority. More... | |
provide functions that access the current thread of execution.
|
inlinenoexcept |
Abort the current thread.
Definition at line 104 of file thread.hpp.
|
inline |
Busy wait for a specified time duration.
| wait_duration | The time to busy wait |
Definition at line 62 of file thread.hpp.
|
inlinenoexcept |
Get the thread ID of the current thread.
Definition at line 42 of file thread.hpp.
|
inlinenoexcept |
Get the current thread's priority.
Definition at line 122 of file thread.hpp.
Referenced by ZTEST().
|
inlinenoexcept |
Set the current thread's priority.
| prio | The new priority of the current thread |
Definition at line 132 of file thread.hpp.
Referenced by ZTEST().
|
inline |
Suspend the current thread for a specified time duration.
| wait_duration | The time to sleep |
Definition at line 77 of file thread.hpp.
References zpp::to_timeout().
Referenced by inc_count(), main(), and ZTEST().
|
inline |
Suspend the current thread until a specified time point.
| wait_duration | The time point util the current thread will sleep |
Definition at line 91 of file thread.hpp.
References zpp::to_timeout().
|
inlinenoexcept |
Suspend the current thread.
Definition at line 112 of file thread.hpp.
|
inlinenoexcept |
Yield the current thread.
Definition at line 50 of file thread.hpp.
Referenced by zpp::sem_base< T_Sem >::operator--(), and zpp::sem_base< T_Sem >::operator-=().