libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::thread_params< API > Class Template Reference

#include <thread_params_traits.hpp>

Public Types

enum  creation_flags { create_running , create_suspended }
 
enum  priority_type {
  lowest , idle , below_normal , normal ,
  above_normal , highest , time_critical , unknown_priority
}
 
enum  states {
  no_kernel_thread =0 , suspended , active , cancelled ,
  get_exit_code_failure , deadlocked_with_another_thread , invalid_thread , thread_id_not_found ,
  failed_to_cancel , null_this_pointer , jmmcg_exception , stl_exception ,
  unknown_exception , terminated , unknown
}
 
enum  thread_cancel_state { cancel_enable , cancel_disable }
 
typedef int stack_size_type
 
typedef int handle_type
 
typedef int pid_type
 
typedef int tid_type
 
using username_type = std::array< char, 256 >
 The size is a guess... More...
 
typedef int processor_mask_type
 
typedef int suspend_count
 
typedef int suspend_period_ms
 
typedef int security_type
 
typedef void core_work_fn_ret_t
 
typedef void core_work_fn_arg_t
 
typedef int arglist_type
 
typedef void initflag_type
 

Public Member Functions

typedef core_work_fn_ret_t (__cdecl core_work_fn_type)(void)
 
__stdcall thread_params (core_work_fn_type *const sa, const security_type se=0, const stack_size_type ss=0) noexcept(true) FORCE_INLINE
 
const tstring to_string () const
 

Public Attributes

const security_type security
 
const stack_size_type stack_size
 
core_work_fn_type *const work_fn
 
arglist_type arglist
 
handle_type handle
 
tid_type id
 

Static Public Attributes

static constexpr generic_traits::api_type api_type =API
 
static constexpr stack_size_type max_stack_size =std::numeric_limits<stack_size_type>::max()
 

Detailed Description

template<generic_traits::api_type API>
class jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::thread_params< API >

Clearly you should provide some useful types for these when you specialise this class for an API!

Definition at line 153 of file thread_params_traits.hpp.

Member Typedef Documentation

◆ arglist_type

◆ core_work_fn_arg_t

◆ core_work_fn_ret_t

◆ handle_type

◆ initflag_type

◆ pid_type

◆ processor_mask_type

◆ security_type

◆ stack_size_type

◆ suspend_count

◆ suspend_period_ms

◆ tid_type

◆ username_type

The size is a guess...

Definition at line 163 of file thread_params_traits.hpp.

Member Enumeration Documentation

◆ creation_flags

Enumerator
create_running 
create_suspended 

Definition at line 184 of file thread_params_traits.hpp.

◆ priority_type

Enumerator
lowest 
idle 
below_normal 
normal 
above_normal 
highest 
time_critical 
unknown_priority 

Definition at line 188 of file thread_params_traits.hpp.

◆ states

Note that these states are in a specific order - the higher the number, the more severe any error.

Enumerator
no_kernel_thread 

This is not a failure - the thread may not be started yet, or may have exited.

suspended 
active 
cancelled 
get_exit_code_failure 
deadlocked_with_another_thread 
invalid_thread 
thread_id_not_found 
failed_to_cancel 
null_this_pointer 
jmmcg_exception 
stl_exception 
unknown_exception 
terminated 
unknown 

Definition at line 202 of file thread_params_traits.hpp.

◆ thread_cancel_state

Enumerator
cancel_enable 
cancel_disable 

Definition at line 220 of file thread_params_traits.hpp.

Constructor & Destructor Documentation

◆ thread_params()

Member Function Documentation

◆ core_work_fn_ret_t()

◆ to_string()

Member Data Documentation

◆ api_type

template<generic_traits::api_type API>
constexpr generic_traits::api_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::thread_params< API >::api_type =API
inlinestaticconstexpr

Definition at line 157 of file thread_params_traits.hpp.

◆ arglist

◆ handle

◆ id

◆ max_stack_size

template<generic_traits::api_type API>
constexpr stack_size_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::thread_params< API >::max_stack_size =std::numeric_limits<stack_size_type>::max()
inlinestaticconstexpr

Definition at line 158 of file thread_params_traits.hpp.

◆ security

◆ stack_size

◆ work_fn


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