libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::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 jmmcg::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::ppd::thread_params< API >

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

Definition at line 188 of file thread_params_traits.hpp.

Member Typedef Documentation

◆ arglist_type

template<generic_traits::api_type API>
typedef int jmmcg::ppd::thread_params< API >::arglist_type

Definition at line 216 of file thread_params_traits.hpp.

◆ core_work_fn_arg_t

template<generic_traits::api_type API>
typedef void jmmcg::ppd::thread_params< API >::core_work_fn_arg_t

Definition at line 207 of file thread_params_traits.hpp.

◆ core_work_fn_ret_t

template<generic_traits::api_type API>
typedef void jmmcg::ppd::thread_params< API >::core_work_fn_ret_t

Definition at line 206 of file thread_params_traits.hpp.

◆ handle_type

template<generic_traits::api_type API>
typedef int jmmcg::ppd::thread_params< API >::handle_type

Definition at line 195 of file thread_params_traits.hpp.

◆ initflag_type

template<generic_traits::api_type API>
typedef void jmmcg::ppd::thread_params< API >::initflag_type

Definition at line 217 of file thread_params_traits.hpp.

◆ pid_type

template<generic_traits::api_type API>
typedef int jmmcg::ppd::thread_params< API >::pid_type

Definition at line 196 of file thread_params_traits.hpp.

◆ processor_mask_type

template<generic_traits::api_type API>
typedef int jmmcg::ppd::thread_params< API >::processor_mask_type

Definition at line 200 of file thread_params_traits.hpp.

◆ security_type

template<generic_traits::api_type API>
typedef int jmmcg::ppd::thread_params< API >::security_type

Definition at line 205 of file thread_params_traits.hpp.

◆ stack_size_type

template<generic_traits::api_type API>
typedef int jmmcg::ppd::thread_params< API >::stack_size_type

Definition at line 190 of file thread_params_traits.hpp.

◆ suspend_count

template<generic_traits::api_type API>
typedef int jmmcg::ppd::thread_params< API >::suspend_count

Definition at line 202 of file thread_params_traits.hpp.

◆ suspend_period_ms

template<generic_traits::api_type API>
typedef int jmmcg::ppd::thread_params< API >::suspend_period_ms

Definition at line 203 of file thread_params_traits.hpp.

◆ tid_type

template<generic_traits::api_type API>
typedef int jmmcg::ppd::thread_params< API >::tid_type

Definition at line 197 of file thread_params_traits.hpp.

◆ username_type

template<generic_traits::api_type API>
using jmmcg::ppd::thread_params< API >::username_type = std::array<char, 256>

The size is a guess...

Definition at line 198 of file thread_params_traits.hpp.

Member Enumeration Documentation

◆ creation_flags

template<generic_traits::api_type API>
enum jmmcg::ppd::thread_params::creation_flags
Enumerator
create_running 
create_suspended 

Definition at line 219 of file thread_params_traits.hpp.

◆ priority_type

template<generic_traits::api_type API>
enum jmmcg::ppd::thread_params::priority_type
Enumerator
lowest 
idle 
below_normal 
normal 
above_normal 
highest 
time_critical 
unknown_priority 

Definition at line 223 of file thread_params_traits.hpp.

◆ states

template<generic_traits::api_type API>
enum jmmcg::ppd::thread_params::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 237 of file thread_params_traits.hpp.

◆ thread_cancel_state

template<generic_traits::api_type API>
enum jmmcg::ppd::thread_params::thread_cancel_state
Enumerator
cancel_enable 
cancel_disable 

Definition at line 255 of file thread_params_traits.hpp.

Constructor & Destructor Documentation

◆ thread_params()

template<generic_traits::api_type API>
__stdcall jmmcg::ppd::thread_params< API >::thread_params ( core_work_fn_type *const  sa,
const security_type  se = 0,
const stack_size_type  ss = 0 
)
inlineexplicitnoexcept

Definition at line 268 of file thread_params_traits.hpp.

Member Function Documentation

◆ core_work_fn_ret_t()

template<generic_traits::api_type API>
typedef jmmcg::ppd::thread_params< API >::core_work_fn_ret_t ( __cdecl  core_work_fn_type)

◆ to_string()

template<generic_traits::api_type API>
const jmmcg::tstring jmmcg::ppd::thread_params< API >::to_string ( ) const
inline

Definition at line 273 of file thread_params_traits.hpp.

Member Data Documentation

◆ api_type

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

Definition at line 192 of file thread_params_traits.hpp.

◆ arglist

template<generic_traits::api_type API>
arglist_type jmmcg::ppd::thread_params< API >::arglist

Definition at line 263 of file thread_params_traits.hpp.

◆ handle

template<generic_traits::api_type API>
handle_type jmmcg::ppd::thread_params< API >::handle

Definition at line 265 of file thread_params_traits.hpp.

◆ id

template<generic_traits::api_type API>
tid_type jmmcg::ppd::thread_params< API >::id

Definition at line 266 of file thread_params_traits.hpp.

◆ max_stack_size

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

Definition at line 193 of file thread_params_traits.hpp.

◆ security

template<generic_traits::api_type API>
const security_type jmmcg::ppd::thread_params< API >::security

Definition at line 260 of file thread_params_traits.hpp.

◆ stack_size

template<generic_traits::api_type API>
const stack_size_type jmmcg::ppd::thread_params< API >::stack_size

Definition at line 261 of file thread_params_traits.hpp.

◆ work_fn

template<generic_traits::api_type API>
core_work_fn_type* const jmmcg::ppd::thread_params< API >::work_fn

Definition at line 262 of file thread_params_traits.hpp.


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