nlib
nn::nlib::threading::ThreadSettings Struct Reference

The class to wrap nlib_thread_attr. nlib_thread_attr_init() and nlib_thread_attr_destroy() are run automatically as required. More...

#include "nn/nlib/threading/Thread.h"

Public Member Functions

void SetDetachState (bool detached) noexcept
 Sets whether to start a thread in a detached state. More...
 
bool GetDetachState () const noexcept
 Returns whether it is set to start a thread in a detached state. More...
 
errno_t SetStackSize (int size) noexcept
 Sets the stack size. More...
 
int GetStackSize () const noexcept
 Returns the set stack size. More...
 
errno_t SetPriority (int priority) noexcept
 Sets the thread priority. The priority value is platform dependent. More...
 
int GetPriority () const noexcept
 Gets the thread priority. More...
 

Detailed Description

The class to wrap nlib_thread_attr. nlib_thread_attr_init() and nlib_thread_attr_destroy() are run automatically as required.

Definition at line 16 of file Thread.h.

Member Function Documentation

nn::nlib::threading::ThreadSettings::GetDetachState ( ) const
inlinenoexcept

Returns whether it is set to start a thread in a detached state.

Returns
true if in a detached state.

Definition at line 35 of file Thread.h.

nn::nlib::threading::ThreadSettings::GetPriority ( ) const
inlinenoexcept

Gets the thread priority.

Returns
Thread priority.

Definition at line 73 of file Thread.h.

nn::nlib::threading::ThreadSettings::GetStackSize ( ) const
inlinenoexcept

Returns the set stack size.

Returns
Stack size.

Definition at line 54 of file Thread.h.

nn::nlib::threading::ThreadSettings::SetDetachState ( bool  detached)
inlinenoexcept

Sets whether to start a thread in a detached state.

Parameters
[in]detachedJoinable if detached is false, or currently detached if detached is true.

Definition at line 26 of file Thread.h.

nn::nlib::threading::ThreadSettings::SetPriority ( int  priority)
inlinenoexcept

Sets the thread priority. The priority value is platform dependent.

Parameters
[in]priorityPriority of the thread.
Returns
Returns 0 on success. Any other value indicates failure.

Definition at line 65 of file Thread.h.

nn::nlib::threading::ThreadSettings::SetStackSize ( int  size)
inlinenoexcept

Sets the stack size.

Parameters
[in]sizeStack size.
Returns
Returns 0 on success. Any other value indicates failure.

Definition at line 46 of file Thread.h.


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