C/C++ API Reference
Loading...
Searching...
No Matches
pw::ThreadAttrs Class Reference

Overview

Generic attributes of a thread. ThreadAttrs is used with a ThreadContext to create threads.

ThreadAtts provides three attributes: name, priority, stack size, and stack location. These attributes should be considered only as hints – the pw_thread backend may not support them.

Public Member Functions

constexpr ThreadAttrs ()
 Initializes attributes to their backend-defined defaults.
 
constexpr ThreadAttrs (const ThreadAttrs &)=default
 Thread attributes can be copied to share properties between threads.
 
constexpr ThreadAttrsoperator= (const ThreadAttrs &)=default
 
constexpr const char * name () const
 Name hint as a null-terminated string. Never null.
 
constexpr ThreadAttrsset_name (const char *name)
 
constexpr ThreadAttrsset_name (std::nullptr_t)=delete
 
constexpr ThreadPriority priority () const
 
constexpr ThreadAttrsset_priority (ThreadPriority priority)
 Sets a thread priority hint.
 
constexpr auto native_stack () const
 
constexpr auto native_stack_pointer () const
 
constexpr auto native_stack_size () const
 
constexpr size_t stack_size_bytes () const
 Returns the size of the stack in bytes.
 
constexpr ThreadAttrsset_stack_size_bytes (size_t stack_size_bytes)
 
template<size_t kStackSizeBytes>
constexpr ThreadAttrsset_stack (ThreadStack< kStackSizeBytes > &stack)
 
constexpr ThreadAttrsclear_stack ()
 Clears a previous call to set_stack.
 
constexpr bool has_external_stack () const
 

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