class thread_data
Declaration
class thread_data : public thread_data_reference_counting { /* full declaration omitted */ };Description
///////////////////////////////////////////////////////////////////////// A \ais the representation of a ParalleX thread. It's a first class object in ParalleX. In our implementation this is a user level thread running on top of one of the OS threads spawned by the \a A \aencapsulates: - A thread status word (see the functions \aand\a- A function to execute (the thread function) - A frame (in this implementation this is a block of memory used as the threads stack) - A block of registers (not implemented yet) Generally, \aare not created or executed directly. All functionality related to the management of \ais implemented by the thread-manager.
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:77
Inherits from: thread_data_reference_counting
Member Variables
Inherited from thread_data_reference_counting:
Method Overview
- public bool add_thread_exit_callback(const util::function<void ()> & f)
- public virtual void destroy()
- public void destroy_thread()
- public void free_thread_exit_callbacks()
- public constexpr const util::backtrace * get_backtrace() const noexcept
- public constexpr std::uint64_t get_component_id() const noexcept
- public util::thread_description get_description() const
- public std::size_t get_last_worker_thread_num() const noexcept
- public util::thread_description get_lco_description() const
- public constexpr std::uint32_t get_parent_locality_id() const noexcept
- public constexpr pika::threads::thread_id_type get_parent_thread_id() const noexcept
- public constexpr std::size_t get_parent_thread_phase() const noexcept
- public constexpr pika::threads::thread_priority get_priority() const noexcept
- public template <typename ThreadQueue>ThreadQueue & get_queue() noexcept
- public policies::scheduler_base * get_scheduler_base() const noexcept
- public std::ptrdiff_t get_stack_size() const noexcept
- public pika::threads::thread_stacksize get_stack_size_enum() const noexcept
- public pika::threads::thread_state get_state(std::memory_order order = std::memory_order_acquire) const noexcept
- public virtual std::size_t get_thread_data() const
- public virtual pika::threads::thread_id_type get_thread_id() const
- public virtual std::size_t get_thread_phase() const noexcept
- public virtual void init()
- public void interrupt(bool flag = true)
- public bool interruption_enabled() const noexcept
- public bool interruption_point(bool throw_on_interrupt = true)
- public bool interruption_requested() const noexcept
- public inline bool is_stackless() const noexcept
- public virtual void rebind(pika::threads::thread_init_data & init_data)
- protected void rebind_base(pika::threads::thread_init_data & init_data)
- public bool restore_state(pika::threads::thread_state new_state, pika::threads::thread_state old_state, std::memory_order load_order = std::memory_order_relaxed, std::memory_order load_exchange = std::memory_order_seq_cst) noexcept
- public bool restore_state(pika::threads::thread_schedule_state new_state, pika::threads::thread_restart_state state_ex, pika::threads::thread_state old_state, std::memory_order load_exchange = std::memory_order_seq_cst) noexcept
- public void run_thread_exit_callbacks()
- public const util::backtrace * set_backtrace(const util::backtrace *) noexcept
- public util::thread_description set_description(util::thread_description)
- public bool set_interruption_enabled(bool enable) noexcept
- public void set_last_worker_thread_num(std::size_t last_worker_thread_num) noexcept
- public util::thread_description set_lco_description(util::thread_description)
- public void set_priority(pika::threads::thread_priority priority) noexcept
- public pika::threads::thread_state set_state(pika::threads::thread_schedule_state state, pika::threads::thread_restart_state state_ex = thread_restart_state::unknown, std::memory_order load_order = std::memory_order_acquire, std::memory_order exchange_order = std::memory_order_seq_cst) noexcept
- protected pika::threads::thread_restart_state set_state_ex(pika::threads::thread_restart_state new_state) noexcept
- public bool set_state_tagged(pika::threads::thread_schedule_state newstate, pika::threads::thread_state & prev_state, pika::threads::thread_state & new_tagged_state, std::memory_order exchange_order = std::memory_order_seq_cst) noexcept
- public virtual std::size_t set_thread_data(std::size_t data)
- public thread_data(const pika::threads::thread_data &)
- public thread_data(pika::threads::thread_init_data & init_data, void * queue, std::ptrdiff_t stacksize, bool is_stackless = false, pika::threads::thread_id_addref addref = thread_id_addref::yes)
- public thread_data(pika::threads::thread_data &&)
- public virtual ~thread_data()
Inherited from thread_data_reference_counting:
Methods
bool add_thread_exit_callback(
const util::function<void()>& f)
bool add_thread_exit_callback(
const util::function<void()>& f)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:485
Parameters
- const util::function<void()>& f
virtual void destroy()
virtual void destroy()Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:588
void destroy_thread()
void destroy_thread()Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:494
void free_thread_exit_callbacks()
void free_thread_exit_callbacks()Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:487
constexpr const util::backtrace* get_backtrace()
const noexcept
constexpr const util::backtrace* get_backtrace()
const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:370
constexpr std::uint64_t get_component_id()
const noexcept
constexpr std::uint64_t get_component_id()
const noexceptDescription
Return the id of the component this thread is running in
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:252
util::thread_description get_description() const
util::thread_description get_description() constDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:258
std::size_t get_last_worker_thread_num()
const noexcept
std::size_t get_last_worker_thread_num()
const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:501
util::thread_description get_lco_description()
const
util::thread_description get_lco_description()
constDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:268
constexpr std::uint32_t get_parent_locality_id()
const noexcept
constexpr std::uint32_t get_parent_locality_id()
const noexceptDescription
Return the locality of the parent thread
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:310
constexpr pika::threads::thread_id_type
get_parent_thread_id() const noexcept
constexpr pika::threads::thread_id_type
get_parent_thread_id() const noexceptDescription
Return the thread id of the parent thread
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:317
constexpr std::size_t get_parent_thread_phase()
const noexcept
constexpr std::size_t get_parent_thread_phase()
const noexceptDescription
Return the phase of the parent thread
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:323
constexpr pika::threads::thread_priority
get_priority() const noexcept
constexpr pika::threads::thread_priority
get_priority() const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:436
template <typename ThreadQueue>
ThreadQueue& get_queue() noexcept
template <typename ThreadQueue>
ThreadQueue& get_queue() noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:523
policies::scheduler_base* get_scheduler_base()
const noexcept
policies::scheduler_base* get_scheduler_base()
const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:496
std::ptrdiff_t get_stack_size() const noexcept
std::ptrdiff_t get_stack_size() const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:512
pika::threads::thread_stacksize
get_stack_size_enum() const noexcept
pika::threads::thread_stacksize
get_stack_size_enum() const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:517
pika::threads::thread_state get_state(
std::memory_order order =
std::memory_order_acquire) const noexcept
pika::threads::thread_state get_state(
std::memory_order order =
std::memory_order_acquire) const noexceptDescription
The get_state function queries the state of this thread instance.
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:98
Parameters
- std::memory_order order = std::memory_order_acquire
Returns
This function returns the current state of this thread. It will return one of the values as defined by the \aenumeration.
virtual std::size_t get_thread_data() const
virtual std::size_t get_thread_data() constDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:551
virtual pika::threads::thread_id_type
get_thread_id() const
virtual pika::threads::thread_id_type
get_thread_id() constDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:538
virtual std::size_t get_thread_phase()
const noexcept
virtual std::size_t get_thread_phase()
const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:544
virtual void init()
virtual void init()Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:565
void interrupt(bool flag = true)
void interrupt(bool flag = true)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:468
Parameters
- bool flag = true
bool interruption_enabled() const noexcept
bool interruption_enabled() const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:453
bool interruption_point(
bool throw_on_interrupt = true)
bool interruption_point(
bool throw_on_interrupt = true)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:483
Parameters
- bool throw_on_interrupt = true
bool interruption_requested() const noexcept
bool interruption_requested() const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:446
inline bool is_stackless() const noexcept
inline bool is_stackless() const noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:489
virtual void rebind(
pika::threads::thread_init_data& init_data)
virtual void rebind(
pika::threads::thread_init_data& init_data)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:566
Parameters
- pika::threads::thread_init_data& init_data
void rebind_base(
pika::threads::thread_init_data& init_data)
void rebind_base(
pika::threads::thread_init_data& init_data)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:591
Parameters
- pika::threads::thread_init_data& init_data
bool restore_state(
pika::threads::thread_state new_state,
pika::threads::thread_state old_state,
std::memory_order load_order =
std::memory_order_relaxed,
std::memory_order load_exchange =
std::memory_order_seq_cst) noexcept
bool restore_state(
pika::threads::thread_state new_state,
pika::threads::thread_state old_state,
std::memory_order load_order =
std::memory_order_relaxed,
std::memory_order load_exchange =
std::memory_order_seq_cst) noexceptDescription
The restore_state function changes the state of this thread instance depending on its current state. It will change the state atomically only if the current state is still the same as passed as the second parameter. Otherwise it won't touch the thread state of this instance.
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:183
Parameters
- pika::threads::thread_state new_state
- pika::threads::thread_state old_state
- std::memory_order load_order = std::memory_order_relaxed
- std::memory_order load_exchange = std::memory_order_seq_cst
Returns
This function returns \aif the state has been changed successfully
bool restore_state(
pika::threads::thread_schedule_state
new_state,
pika::threads::thread_restart_state state_ex,
pika::threads::thread_state old_state,
std::memory_order load_exchange =
std::memory_order_seq_cst) noexcept
bool restore_state(
pika::threads::thread_schedule_state
new_state,
pika::threads::thread_restart_state state_ex,
pika::threads::thread_state old_state,
std::memory_order load_exchange =
std::memory_order_seq_cst) noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:205
Parameters
- pika::threads::thread_schedule_state new_state
- pika::threads::thread_restart_state state_ex
- pika::threads::thread_state old_state
- std::memory_order load_exchange = std::memory_order_seq_cst
void run_thread_exit_callbacks()
void run_thread_exit_callbacks()Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:486
const util::backtrace* set_backtrace(
const util::backtrace*) noexcept
const util::backtrace* set_backtrace(
const util::backtrace*) noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:374
Parameters
- const util::backtrace*
util::thread_description set_description(
util::thread_description)
util::thread_description set_description(
util::thread_description)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:262
Parameters
bool set_interruption_enabled(
bool enable) noexcept
bool set_interruption_enabled(
bool enable) noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:460
Parameters
- bool enable
void set_last_worker_thread_num(
std::size_t last_worker_thread_num) noexcept
void set_last_worker_thread_num(
std::size_t last_worker_thread_num) noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:506
Parameters
- std::size_t last_worker_thread_num
util::thread_description set_lco_description(
util::thread_description)
util::thread_description set_lco_description(
util::thread_description)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:272
Parameters
void set_priority(pika::threads::thread_priority
priority) noexcept
void set_priority(pika::threads::thread_priority
priority) noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:440
Parameters
- pika::threads::thread_priority priority
pika::threads::thread_state set_state(
pika::threads::thread_schedule_state state,
pika::threads::thread_restart_state state_ex =
thread_restart_state::unknown,
std::memory_order load_order =
std::memory_order_acquire,
std::memory_order exchange_order =
std::memory_order_seq_cst) noexcept
pika::threads::thread_state set_state(
pika::threads::thread_schedule_state state,
pika::threads::thread_restart_state state_ex =
thread_restart_state::unknown,
std::memory_order load_order =
std::memory_order_acquire,
std::memory_order exchange_order =
std::memory_order_seq_cst) noexceptDescription
The set_state function changes the state of this thread instance.
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:117
Parameters
- pika::threads::thread_schedule_state state
- pika::threads::thread_restart_state state_ex = thread_restart_state::unknown
- std::memory_order load_order = std::memory_order_acquire
- std::memory_order exchange_order = std::memory_order_seq_cst
pika::threads::thread_restart_state set_state_ex(
pika::threads::thread_restart_state
new_state) noexcept
pika::threads::thread_restart_state set_state_ex(
pika::threads::thread_restart_state
new_state) noexceptDescription
The set_state function changes the extended state of this thread instance.
Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:229
Parameters
- pika::threads::thread_restart_state new_state
bool set_state_tagged(
pika::threads::thread_schedule_state newstate,
pika::threads::thread_state& prev_state,
pika::threads::thread_state& new_tagged_state,
std::memory_order exchange_order =
std::memory_order_seq_cst) noexcept
bool set_state_tagged(
pika::threads::thread_schedule_state newstate,
pika::threads::thread_state& prev_state,
pika::threads::thread_state& new_tagged_state,
std::memory_order exchange_order =
std::memory_order_seq_cst) noexceptDeclared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:148
Parameters
- pika::threads::thread_schedule_state newstate
- pika::threads::thread_state& prev_state
- pika::threads::thread_state& new_tagged_state
- std::memory_order exchange_order = std::memory_order_seq_cst
virtual std::size_t set_thread_data(
std::size_t data)
virtual std::size_t set_thread_data(
std::size_t data)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:552
Parameters
- std::size_t data
thread_data(const pika::threads::thread_data&)
thread_data(const pika::threads::thread_data&)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:80
Parameters
- const pika::threads::thread_data&
thread_data(
pika::threads::thread_init_data& init_data,
void* queue,
std::ptrdiff_t stacksize,
bool is_stackless = false,
pika::threads::thread_id_addref addref =
thread_id_addref::yes)
thread_data(
pika::threads::thread_init_data& init_data,
void* queue,
std::ptrdiff_t stacksize,
bool is_stackless = false,
pika::threads::thread_id_addref addref =
thread_id_addref::yes)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:583
Parameters
- pika::threads::thread_init_data& init_data
- void* queue
- std::ptrdiff_t stacksize
- bool is_stackless = false
- pika::threads::thread_id_addref addref = thread_id_addref::yes
thread_data(pika::threads::thread_data&&)
thread_data(pika::threads::thread_data&&)Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:81
Parameters
virtual ~thread_data()
virtual ~thread_data()Declared at: libs/pika/threading_base/include/pika/threading_base/thread_data.hpp:587