µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
thread::id Class Reference

Thread unique id. More...

#include <thread_internal.h>

Public Member Functions

 id () noexcept
 
 id (const id &)=default
 
 id (native_handle_type system_thread) noexcept
 
 ~id ()=default
 
idoperator= (const id &)=default
 

Private Attributes

native_handle_type native_thread_
 

Friends

bool operator< (thread::id x, thread::id y) noexcept
 
bool operator== (thread::id x, thread::id y) noexcept
 
struct std::hash< thread::id >
 
class thread
 Get the current running thread.
 

Detailed Description

Thread unique id.

An object of type thread::id provides a unique identifier for each thread of execution and a single distinct value for all thread objects that do not represent a thread of execution (33.3.2). Each thread of execution has an associated thread::id object that is not equal to the thread::id object of any other thread of execution and that is not equal to the thread::id object of any thread object that does not represent threads of execution.

thread::id shall be a trivially copyable class (Clause 12). The library may reuse the value of a thread::id of a terminated thread that can no longer be joined.

Definition at line 78 of file thread_internal.h.

Constructor & Destructor Documentation

◆ id() [1/3]

thread::id::id ( )
inlinenoexcept

Definition at line 304 of file thread_internal.h.

◆ id() [2/3]

thread::id::id ( native_handle_type  system_thread)
inlineexplicitnoexcept

Definition at line 311 of file thread_internal.h.

◆ id() [3/3]

thread::id::id ( const id )
default

◆ ~id()

thread::id::~id ( )
default

Member Function Documentation

◆ operator=()

id & thread::id::operator= ( const id )
default

Friends And Related Symbol Documentation

◆ operator<

bool operator< ( thread::id  x,
thread::id  y 
)
friend

Definition at line 277 of file thread_internal.h.

◆ operator==

bool operator== ( thread::id  x,
thread::id  y 
)
friend

Definition at line 266 of file thread_internal.h.

◆ std::hash< thread::id >

friend struct std::hash< thread::id >
friend

Definition at line 94 of file thread_internal.h.

◆ thread

friend class thread ( void  )
friend

Get the current running thread.

Parameters
None.
Returns
Reference to the current running thread.
Warning
Cannot be invoked from Interrupt Service Routines.

Definition at line 94 of file thread_internal.h.

Member Data Documentation

◆ native_thread_

native_handle_type thread::id::native_thread_
private

Definition at line 105 of file thread_internal.h.


The documentation for this class was generated from the following file: