Iros
 
Loading...
Searching...
No Matches
dius::PlatformThread Struct Reference

#include <dius/iros/thread.h>

Inheritance diagram for dius::PlatformThread:
[legend]

Public Member Functions

 PlatformThread ()=default
 
auto id () const -> int
 
auto join () -> di::Result< void >
 
auto thread_local_storage (usize tls_size) -> di::Span< byte >
 
auto id () const -> pthread_t
 
auto join () -> di::Result< void >
 
- Public Member Functions inherited from di::util::SelfPointer< T >
constexpr SelfPointer ()
 
constexpr SelfPointer (SelfPointer const &)
 
constexpr SelfPointer (SelfPointer &&)
 
constexpr auto operator= (SelfPointer const &) -> SelfPointer &
 
constexpr auto operator= (SelfPointer &&) -> SelfPointer &
 
- Public Member Functions inherited from di::util::Immovable
 Immovable ()=default
 
 Immovable (Immovable &&)=delete
 

Static Public Member Functions

static auto create (runtime::TlsInfo) -> di::Result< di::Box< PlatformThread, PlatformThreadDeleter > >
 
static auto current () -> PlatformThread &
 

Public Attributes

int thread_id { 0 }
 
di::Atomic< int > join_word { 0 }
 
bytestack { nullptr }
 
di::Function< void()> entry
 
pthread_t native_handle {}
 
- Public Attributes inherited from di::util::SelfPointer< T >
T * self { nullptr }
 

Constructor & Destructor Documentation

◆ PlatformThread()

dius::PlatformThread::PlatformThread ( )
default

Member Function Documentation

◆ create()

auto dius::PlatformThread::create ( runtime::TlsInfo info) -> di::Result<di::Box<PlatformThread, PlatformThreadDeleter>>
static

◆ current()

auto dius::PlatformThread::current ( ) -> PlatformThread&
static

◆ id() [1/2]

auto dius::PlatformThread::id ( ) const -> int
inline

◆ id() [2/2]

auto dius::PlatformThread::id ( ) const -> pthread_t
inline

◆ join() [1/2]

auto dius::PlatformThread::join ( ) -> di::Result<void>

◆ join() [2/2]

auto dius::PlatformThread::join ( ) -> di::Result< void >

◆ thread_local_storage()

auto dius::PlatformThread::thread_local_storage ( usize tls_size) -> di::Span<byte>
inline

Member Data Documentation

◆ entry

di::Function< void()> dius::PlatformThread::entry

◆ join_word

di::Atomic<int> dius::PlatformThread::join_word { 0 }

◆ native_handle

pthread_t dius::PlatformThread::native_handle {}

◆ stack

byte* dius::PlatformThread::stack { nullptr }

◆ thread_id

int dius::PlatformThread::thread_id { 0 }

The documentation for this struct was generated from the following files: