µ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_internal.h File Reference

Go to the source code of this file.

Classes

class  thread::id
 Thread unique id. More...
 
class  thread
 Standard thread. More...
 

Namespaces

namespace  this_thread
 A namespace for functions applying to the current thread.
 

Functions

thread::id this_thread::get_id () noexcept
 Return the id of the current running thread.
 
bool operator!= (thread::id x, thread::id y) noexcept
 
bool operator< (thread::id x, thread::id y) noexcept
 
bool operator<= (thread::id x, thread::id y) noexcept
 
bool operator== (thread::id x, thread::id y) noexcept
 
bool operator> (thread::id x, thread::id y) noexcept
 
bool operator>= (thread::id x, thread::id y) noexcept
 
template<typename Clock_T = os::estd::chrono::systick_clock, typename Rep_T , typename Period_T >
constexpr void this_thread::sleep_for (const std::chrono::duration< Rep_T, Period_T > &rel_time)
 Sleep for a given duration.
 
template<typename Clock_T , typename Duration_T >
void this_thread::sleep_until (const std::chrono::time_point< Clock_T, Duration_T > &abs_time)
 Sleep until a given time point.
 
template<typename Duration_T >
void this_thread::sleep_until (const std::chrono::time_point< os::estd::chrono::realtime_clock, Duration_T > &abs_time)
 
template<typename Duration_T >
void this_thread::sleep_until (const std::chrono::time_point< os::estd::chrono::systick_clock, Duration_T > &abs_time)
 
void swap (thread &x, thread &y) noexcept
 
void this_thread::yield () noexcept
 Yield the CPU to the next ready thread.
 

Function Documentation

◆ operator!=()

bool operator!= ( thread::id  x,
thread::id  y 
)
inlinenoexcept

Definition at line 252 of file thread_internal.h.

253{
254 return !(x == y);
255}

◆ operator<()

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

Definition at line 257 of file thread_internal.h.

259{
260 return x.native_thread_ < y.native_thread_;
261}
native_handle_type native_thread_

◆ operator<=()

bool operator<= ( thread::id  x,
thread::id  y 
)
inlinenoexcept

Definition at line 263 of file thread_internal.h.

265{
266 return !(y < x);
267}

◆ operator==()

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

Definition at line 246 of file thread_internal.h.

247{
248 return x.native_thread_ == y.native_thread_;
249}

◆ operator>()

bool operator> ( thread::id  x,
thread::id  y 
)
inlinenoexcept

Definition at line 270 of file thread_internal.h.

271{
272 return y < x;
273}

◆ operator>=()

bool operator>= ( thread::id  x,
thread::id  y 
)
inlinenoexcept

Definition at line 276 of file thread_internal.h.

277{
278 return !(x < y);
279}

◆ swap()

void swap ( thread x,
thread y 
)
inlinenoexcept

Definition at line 240 of file thread_internal.h.

241{
242 x.swap (y);
243}
void swap(thread &t) noexcept
Definition thread-cpp.h:67

Referenced by thread::thread(), and thread::operator=().