|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
Opaque identity for an oveRTOS thread. std::thread::id analog.
More...
#include <thread.hpp>
Public Member Functions | |
| constexpr | thread_id (ove_thread_t h) noexcept |
| ove_thread_t | native_handle () const noexcept |
Friends | |
| constexpr bool | operator== (const thread_id &, const thread_id &) noexcept=default |
| constexpr auto | operator<=> (const thread_id &, const thread_id &) noexcept=default |
Opaque identity for an oveRTOS thread. std::thread::id analog.
Default-constructible (represents "no thread"), equality-comparable, and strict-weak-ordered (<=> via the underlying handle pointer). Useful for storing thread identities in associative containers.
Also exposed as Thread<N>::id (alias) to mirror std::thread::id usage — Thread<4096>::id and Thread<2048>::id are the same type, so values from differently-sized wrappers compare cleanly.
Note: like std::thread::id, the identity is only meaningful while the thread is alive. Once the kernel reaps the thread, the handle value may be reused by a future thread and the two would compare equal — same semantics as std::thread::id.
|
inlinenoexcept |
ove_thread_t handle (may be null for default-constructed id).