libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::ppd::api_threading_traits< API, Mdl > Struct Template Reference

#include <exception.hpp>

Classes

struct  cancellability
 

Public Types

typedef thread_params< API > api_params_type
 
typedef api_lock_traits< API, Mdl > lock_traits
 
typedef Mdl model_type
 
typedef char demangled_name_t[16384]
 An unmangled name surely can't be longer than 16k?! More...
 
typedef std::array< char, max_num_fn_ptrs *sizeof(demangled_name_t)> demangled_names_t
 And this struct would never be larger than the stack size we've allowed in a thread, surely?! More...
 

Public Member Functions

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::pid_type __fastcall get_current_process_id (void) noexcept(true)
 
template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::tid_type __fastcall get_current_thread_id (void) noexcept(true)
 
template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::handle_type __fastcall get_current_thread (void) noexcept(true)
 
template<>
void __fastcall demangle_name (char *const mangled_name, demangled_name_t &demangled_name) noexcept(true)
 
template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::demangled_names_t __fastcall gen_backtrace () noexcept(true)
 
template<>
void __fastcall set_backtrace_on_signal () noexcept(true)
 
template<>
void __fastcall set_backtrace_on_terminate () noexcept(true)
 
template<>
bool __fastcall create (const api_params_type::creation_flags creflag, api_params_type &parms) noexcept(true)
 Run the work only once if it returns at all, unlike the multi-threaded variant. More...
 
template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::suspend_count __fastcall suspend (api_params_type const &) noexcept(true)
 
template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::suspend_count __fastcall resume (api_params_type const &parms) noexcept(true)
 This does not run the work at all, unlike the multi-threaded variant. More...
 
template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::states __fastcall state (api_params_type &) noexcept(true)
 
template<>
void __fastcall exit (const api_params_type::states) noexcept(true)
 
template<>
void __fastcall terminate (api_params_type::handle_type)
 
template<>
void __fastcall cleanup (api_params_type::handle_type)
 
template<>
void __fastcall set_kernel_priority (api_params_type::handle_type, const api_params_type::priority_type)
 
template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::priority_type __fastcall get_kernel_priority (api_params_type::handle_type)
 
template<>
void __fastcall set_kernel_affinity (api_params_type::handle_type const, api_params_type::processor_mask_type const)
 
template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::processor_mask_type __fastcall get_kernel_affinity (api_params_type::handle_type const)
 
template<>
void __fastcall set_cancelstate (api_params_type::thread_cancel_state)
 
template<>
void __fastcall sleep (const api_params_type::suspend_period_ms)
 
template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::states __fastcall wait_thread_exit (api_params_type &, const lock_traits::timeout_type) noexcept(true)
 
template<>
bool __fastcall create (const api_params_type::creation_flags creflag, api_params_type &cp)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::suspend_count __fastcall suspend (api_params_type const &thread)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::suspend_count __fastcall resume (const api_params_type &parms)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::states __fastcall state (api_params_type &thread)
 
template<>
void __fastcall exit (const api_params_type::states exit_code)
 
template<>
void __fastcall terminate (api_params_type const &thread)
 
template<>
void __fastcall cleanup (api_params_type const &thread)
 
template<>
void __fastcall set_kernel_priority (api_params_type::handle_type thread, const api_params_type::priority_type priority)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::priority_type get_kernel_priority (api_params_type::handle_type thread)
 
template<>
void __fastcall set_kernel_affinity (api_params_type::handle_type const thread_handle, api_params_type::processor_mask_type const mask)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::processor_mask_type __fastcall get_kernel_affinity (api_params_type::handle_type const thread_handle)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::pid_type __fastcall get_current_process_id (void)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::tid_type __fastcall get_current_thread_id (void)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::handle_type __fastcall get_current_thread ()
 
template<>
void __fastcall set_cancelstate (api_params_type::thread_cancel_state)
 
template<>
void __fastcall sleep (const api_params_type::suspend_period_ms period)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::states __fastcall wait_thread_exit (api_params_type &params, const lock_traits::timeout_type period)
 
template<>
void __fastcall demangle_name (char *const mangled_name, demangled_name_t &demangled_name) noexcept(true)
 
template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::demangled_names_t __fastcall gen_backtrace () noexcept(true)
 
template<>
void __fastcall set_backtrace_on_signal () noexcept(true)
 
template<>
void __fastcall set_backtrace_on_terminate () noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::pid_type __fastcall get_current_process_id () noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::tid_type __fastcall get_current_thread_id () noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::handle_type __fastcall get_current_thread () noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::username_type __fastcall get_current_username () noexcept(true)
 
template<>
void __fastcall demangle_name (char *const mangled_name, demangled_name_t &demangled_name) noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::demangled_names_t __fastcall gen_backtrace () noexcept(true)
 
template<>
void __fastcall set_backtrace_on_signal () noexcept(true)
 
template<>
void __fastcall set_backtrace_on_terminate () noexcept(true)
 
template<>
bool __fastcall create (const api_params_type::creation_flags creflag, api_params_type &parms) noexcept(true)
 Run the work only once if it returns at all, unlike the multi-threaded variant. More...
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::suspend_count __fastcall suspend (api_params_type const &) noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::suspend_count __fastcall resume (api_params_type const &parms) noexcept(true)
 This does not run the work at all, unlike the multi-threaded variant. More...
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::states __fastcall state (api_params_type &) noexcept(true)
 
template<>
void __fastcall exit (api_params_type::states &) noexcept(true)
 
template<>
void __fastcall terminate (api_params_type::handle_type) noexcept(false)
 
template<>
void __fastcall cleanup (api_params_type::handle_type) noexcept(false)
 
template<>
void __fastcall set_kernel_priority (api_params_type::handle_type, const api_params_type::priority_type) noexcept(false)
 
template<>
void __fastcall set_kernel_affinity (typename api_params_type::handle_type const, const api_params_type::processor_mask_type) noexcept(false)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::processor_mask_type __fastcall get_kernel_affinity (typename api_params_type::handle_type const) noexcept(false)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::priority_type __fastcall get_kernel_priority (api_params_type::handle_type) noexcept(false)
 
template<>
void __fastcall set_cancelstate (api_params_type::thread_cancel_state) noexcept(false)
 
template<>
void __fastcall sleep (const api_params_type::suspend_period_ms) noexcept(false)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::api_params_type::states __fastcall wait_thread_exit (api_params_type &, const lock_traits::timeout_type) noexcept(false)
 
template<>
bool create (const api_params_type::creation_flags, api_params_type &cp) noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::suspend_count suspend (api_params_type const &) noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::suspend_count resume (api_params_type const &) noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::states state (api_params_type &thread) noexcept(true)
 
template<>
bool __fastcall is_running (api_params_type &thread) noexcept(true)
 
template<>
void exit (api_params_type::states &exit_code) noexcept(true)
 
template<>
void terminate (api_params_type::handle_type thread) noexcept(false)
 
template<>
void cleanup (api_params_type::handle_type thread) noexcept(false)
 
template<>
void set_kernel_priority (api_params_type::handle_type, const api_params_type::priority_type priority) noexcept(false)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::priority_type get_kernel_priority (api_params_type::handle_type thread) noexcept(false)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::pid_type get_current_process_id () noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::tid_type get_current_thread_id () noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::handle_type get_current_thread () noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::username_type __fastcall get_current_username () noexcept(true)
 
template<>
void __fastcall set_kernel_affinity (typename api_params_type::handle_type const thread_id, api_params_type::processor_mask_type const mask) noexcept(false)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::processor_mask_type __fastcall get_kernel_affinity (typename api_params_type::handle_type const thread_id) noexcept(false)
 
template<>
void __fastcall set_cancelstate (api_params_type::thread_cancel_state state) noexcept(false)
 
template<>
void sleep (const api_params_type::suspend_period_ms period) noexcept(false)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::api_params_type::states wait_thread_exit (api_params_type &thread, const lock_traits::timeout_type) noexcept(false)
 
template<>
void __fastcall demangle_name (char *const mangled_name, demangled_name_t &demangled_name) noexcept(true)
 
template<>
api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::demangled_names_t __fastcall gen_backtrace () noexcept(true)
 
template<>
void __fastcall set_backtrace_on_signal () noexcept(true)
 
template<>
void __fastcall set_backtrace_on_terminate () noexcept(true)
 

Static Public Member Functions

static bool __fastcall create (const typename api_params_type::creation_flags creflag, api_params_type &) noexcept(true) FORCE_INLINE
 Create a new OS-level thread of the appropriate type. More...
 
static api_params_type::suspend_count __fastcall suspend (api_params_type const &) noexcept(true) FORCE_INLINE
 
static api_params_type::suspend_count __fastcall resume (api_params_type const &) noexcept(true) FORCE_INLINE
 
static api_params_type::states __fastcall state (api_params_type &) noexcept(true) FORCE_INLINE
 
static bool __fastcall is_running (api_params_type &) noexcept(true) FORCE_INLINE
 
static void __fastcall exit (typename api_params_type::states &) noexcept(true) FORCE_INLINE
 Exit the currently running thread. More...
 
static void __fastcall terminate (typename api_params_type::handle_type) noexcept(false) FORCE_INLINE
 Request or force that the target thread exit. More...
 
static void __fastcall cleanup (typename api_params_type::handle_type) noexcept(false) FORCE_INLINE
 Ensure that any possible clean up that may need to be done of thread state may be performed after the thread has exited. More...
 
static void __fastcall set_kernel_priority (typename api_params_type::handle_type, const typename api_params_type::priority_type) noexcept(false) FORCE_INLINE
 
static api_params_type::priority_type __fastcall get_kernel_priority (typename api_params_type::handle_type) noexcept(false) FORCE_INLINE
 
static void __fastcall set_kernel_affinity (typename api_params_type::handle_type const, typename api_params_type::processor_mask_type const) noexcept(false) FORCE_INLINE
 
static api_params_type::processor_mask_type __fastcall get_kernel_affinity (typename api_params_type::handle_type const) noexcept(false) FORCE_INLINE
 
static api_params_type::pid_type __fastcall get_current_process_id () noexcept(true) FORCE_INLINE
 
static api_params_type::tid_type __fastcall get_current_thread_id () noexcept(true) FORCE_INLINE
 
static api_params_type::handle_type __fastcall get_current_thread () noexcept(true) FORCE_INLINE
 
static api_params_type::username_type __fastcall get_current_username () noexcept(true) FORCE_INLINE
 
static void __fastcall set_cancelstate (typename api_params_type::thread_cancel_state state) noexcept(false) FORCE_INLINE
 
static void __fastcall sleep (const typename api_params_type::suspend_period_ms period) noexcept(false) FORCE_INLINE
 Sort-of threading, as it suspends the current thread of execution. More...
 
static api_params_type::states __fastcall wait_thread_exit (api_params_type &, const typename lock_traits::timeout_type period) noexcept(false) FORCE_INLINE
 
static void __fastcall demangle_name (char *const mangled_name, demangled_name_t &demangled_name) noexcept(true)
 Attempt to demangle a potentially mangled C++ identifier. More...
 
static demangled_names_t __fastcall gen_backtrace () noexcept(true)
 Return a string containing the current backtrace, with demangled names, separated by "\n". More...
 
static void __fastcall set_backtrace_on_signal () noexcept(true)
 Dump a backtrace to std::cerr if SIGABRT is raised, once this function is called. More...
 
static void __fastcall set_backtrace_on_terminate () noexcept(true)
 Dump a backtrace to std::cerr if std::terminate is called, once this function is called. More...
 

Static Public Attributes

static constexpr int max_num_fn_ptrs =100
 100 functions in the stack frame should be enough for anyone... Eeek! More...
 

Detailed Description

template<generic_traits::api_type API, typename Mdl>
struct jmmcg::ppd::api_threading_traits< API, Mdl >

Definition at line 79 of file exception.hpp.

Member Typedef Documentation

◆ api_params_type

template<generic_traits::api_type API, typename Mdl>
typedef thread_params<API> jmmcg::ppd::api_threading_traits< API, Mdl >::api_params_type

Definition at line 251 of file thread_api_traits.hpp.

◆ demangled_name_t

template<generic_traits::api_type API, typename Mdl>
typedef char jmmcg::ppd::api_threading_traits< API, Mdl >::demangled_name_t[16384]

An unmangled name surely can't be longer than 16k?!

Definition at line 255 of file thread_api_traits.hpp.

◆ demangled_names_t

template<generic_traits::api_type API, typename Mdl>
typedef std::array<char, max_num_fn_ptrs*sizeof(demangled_name_t)> jmmcg::ppd::api_threading_traits< API, Mdl >::demangled_names_t

And this struct would never be larger than the stack size we've allowed in a thread, surely?!

Definition at line 259 of file thread_api_traits.hpp.

◆ lock_traits

template<generic_traits::api_type API, typename Mdl>
typedef api_lock_traits<API, Mdl> jmmcg::ppd::api_threading_traits< API, Mdl >::lock_traits

Definition at line 252 of file thread_api_traits.hpp.

◆ model_type

template<generic_traits::api_type API, typename Mdl>
typedef Mdl jmmcg::ppd::api_threading_traits< API, Mdl >::model_type

Definition at line 253 of file thread_api_traits.hpp.

Member Function Documentation

◆ cleanup() [1/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::cleanup ( api_params_type const &  thread)
inline

Definition at line 236 of file thread_api_traits_impl.hpp.

◆ cleanup() [2/5]

◆ cleanup() [3/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::cleanup ( api_params_type::handle_type  )
inline

Definition at line 154 of file thread_api_traits_impl.hpp.

◆ cleanup() [4/5]

◆ cleanup() [5/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::cleanup ( typename api_params_type::handle_type  )
staticnoexcept

Ensure that any possible clean up that may need to be done of thread state may be performed after the thread has exited.

◆ create() [1/5]

template<>
bool __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::create ( const api_params_type::creation_flags  creflag,
api_params_type cp 
)
inline

Definition at line 189 of file thread_api_traits_impl.hpp.

◆ create() [2/5]

template<>
bool __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::create ( const api_params_type::creation_flags  creflag,
api_params_type parms 
)
inlinenoexcept

Run the work only once if it returns at all, unlike the multi-threaded variant.

If the worker_fn() returns true then it will run once, then exit, otherwise it will depend upon the return value for pre_exit(). If this always returns false, then the system will enter an infinite loop. By default pre_exit() for sequential mode returns false.

See also
worker_fn(), pre_exit(), process()

Definition at line 118 of file thread_api_traits_impl.hpp.

◆ create() [3/5]

Run the work only once if it returns at all, unlike the multi-threaded variant.

If the worker_fn() returns true then it will run once, then exit, otherwise it will depend upon the return value for pre_exit(). If this always returns false, then the system will enter an infinite loop. By default pre_exit() for sequential mode returns false.

See also
worker_fn(), process()

Definition at line 234 of file thread_api_traits_impl.hpp.

◆ create() [4/5]

◆ create() [5/5]

template<generic_traits::api_type API, typename Mdl>
static bool __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::create ( const typename api_params_type::creation_flags  creflag,
api_params_type  
)
staticnoexcept

Create a new OS-level thread of the appropriate type.

Returns
true is the OS-level thread was successfully created, false otherwise.

◆ demangle_name() [1/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::demangle_name ( char *const  mangled_name,
demangled_name_t demangled_name 
)
inlinenoexcept

Definition at line 85 of file thread_api_traits_impl.hpp.

◆ demangle_name() [2/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::demangle_name ( char *const  mangled_name,
demangled_name_t demangled_name 
)
inlinenoexcept

Definition at line 89 of file thread_api_traits_impl.hpp.

◆ demangle_name() [3/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::demangle_name ( char *const  mangled_name,
demangled_name_t demangled_name 
)
staticnoexcept

Attempt to demangle a potentially mangled C++ identifier.

◆ demangle_name() [4/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::demangle_name ( char *const  mangled_name,
demangled_name_t demangled_name 
)
inlinenoexcept

Definition at line 297 of file thread_api_traits_impl.hpp.

◆ demangle_name() [5/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::demangle_name ( char *const  mangled_name,
demangled_name_t demangled_name 
)
inlinenoexcept

Definition at line 548 of file thread_api_traits_impl.hpp.

◆ exit() [1/5]

◆ exit() [2/5]

◆ exit() [3/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::exit ( const api_params_type::states  exit_code)
inline

Definition at line 225 of file thread_api_traits_impl.hpp.

◆ exit() [4/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::exit ( const api_params_type::states  )
inlinenoexcept

Definition at line 146 of file thread_api_traits_impl.hpp.

◆ exit() [5/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::exit ( typename api_params_type::states )
staticnoexcept

Exit the currently running thread.

◆ gen_backtrace() [1/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::demangled_names_t __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::gen_backtrace ( )
inlinenoexcept

Definition at line 90 of file thread_api_traits_impl.hpp.

◆ gen_backtrace() [2/5]

◆ gen_backtrace() [3/5]

template<generic_traits::api_type API, typename Mdl>
static demangled_names_t __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::gen_backtrace ( )
staticnoexcept

Return a string containing the current backtrace, with demangled names, separated by "\n".

◆ gen_backtrace() [4/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::demangled_names_t __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::gen_backtrace ( )
inlinenoexcept

Definition at line 302 of file thread_api_traits_impl.hpp.

◆ gen_backtrace() [5/5]

◆ get_current_process_id() [1/5]

◆ get_current_process_id() [2/5]

◆ get_current_process_id() [3/5]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::pid_type __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::get_current_process_id ( )
staticnoexcept

◆ get_current_process_id() [4/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::pid_type __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::get_current_process_id ( void  )
inline

Definition at line 268 of file thread_api_traits_impl.hpp.

◆ get_current_process_id() [5/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::pid_type __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::get_current_process_id ( void  )
inlinenoexcept

Definition at line 70 of file thread_api_traits_impl.hpp.

◆ get_current_thread() [1/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::handle_type __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::get_current_thread ( )
inline

Definition at line 278 of file thread_api_traits_impl.hpp.

◆ get_current_thread() [2/5]

◆ get_current_thread() [3/5]

◆ get_current_thread() [4/5]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::handle_type __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::get_current_thread ( )
staticnoexcept

◆ get_current_thread() [5/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::handle_type __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::get_current_thread ( void  )
inlinenoexcept

Definition at line 80 of file thread_api_traits_impl.hpp.

◆ get_current_thread_id() [1/5]

◆ get_current_thread_id() [2/5]

◆ get_current_thread_id() [3/5]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::tid_type __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::get_current_thread_id ( )
staticnoexcept

◆ get_current_thread_id() [4/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::tid_type __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::get_current_thread_id ( void  )
inline

Definition at line 273 of file thread_api_traits_impl.hpp.

◆ get_current_thread_id() [5/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::tid_type __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::get_current_thread_id ( void  )
inlinenoexcept

Definition at line 75 of file thread_api_traits_impl.hpp.

◆ get_current_username() [1/3]

◆ get_current_username() [2/3]

◆ get_current_username() [3/3]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::username_type __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::get_current_username ( )
staticnoexcept

◆ get_kernel_affinity() [1/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::processor_mask_type __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::get_kernel_affinity ( api_params_type::handle_type const  thread_handle)
inline

Definition at line 260 of file thread_api_traits_impl.hpp.

◆ get_kernel_affinity() [2/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::processor_mask_type __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::get_kernel_affinity ( api_params_type::handle_type const  )
inline

Definition at line 171 of file thread_api_traits_impl.hpp.

◆ get_kernel_affinity() [3/5]

◆ get_kernel_affinity() [4/5]

◆ get_kernel_affinity() [5/5]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::processor_mask_type __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::get_kernel_affinity ( typename api_params_type::handle_type const  )
staticnoexcept

◆ get_kernel_priority() [1/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::priority_type jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::get_kernel_priority ( api_params_type::handle_type  thread)
inline

Definition at line 248 of file thread_api_traits_impl.hpp.

◆ get_kernel_priority() [2/5]

◆ get_kernel_priority() [3/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::priority_type __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::get_kernel_priority ( api_params_type::handle_type  )
inline

Definition at line 162 of file thread_api_traits_impl.hpp.

◆ get_kernel_priority() [4/5]

◆ get_kernel_priority() [5/5]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::priority_type __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::get_kernel_priority ( typename api_params_type::handle_type  )
staticnoexcept

◆ is_running() [1/2]

template<generic_traits::api_type API_, typename Mdl_ >
bool __fastcall jmmcg::ppd::api_threading_traits< API_, Mdl_ >::is_running ( api_params_type parms)
inlinestaticnoexcept

Definition at line 61 of file thread_api_traits_impl.hpp.

◆ is_running() [2/2]

◆ resume() [1/5]

◆ resume() [2/5]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::suspend_count __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::resume ( api_params_type const &  )
staticnoexcept

◆ resume() [3/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::suspend_count __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::resume ( api_params_type const &  parms)
inlinenoexcept

This does not run the work at all, unlike the multi-threaded variant.

Definition at line 135 of file thread_api_traits_impl.hpp.

◆ resume() [4/5]

This does not run the work at all, unlike the multi-threaded variant.

Definition at line 250 of file thread_api_traits_impl.hpp.

◆ resume() [5/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::suspend_count __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::resume ( const api_params_type parms)
inline

Definition at line 207 of file thread_api_traits_impl.hpp.

◆ set_backtrace_on_signal() [1/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::set_backtrace_on_signal ( )
inlinenoexcept

Definition at line 97 of file thread_api_traits_impl.hpp.

◆ set_backtrace_on_signal() [2/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::set_backtrace_on_signal ( )
inlinenoexcept

Definition at line 190 of file thread_api_traits_impl.hpp.

◆ set_backtrace_on_signal() [3/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::set_backtrace_on_signal ( )
staticnoexcept

Dump a backtrace to std::cerr if SIGABRT is raised, once this function is called.

◆ set_backtrace_on_signal() [4/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::set_backtrace_on_signal ( )
inlinenoexcept

Definition at line 307 of file thread_api_traits_impl.hpp.

◆ set_backtrace_on_signal() [5/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::set_backtrace_on_signal ( )
inlinenoexcept

Definition at line 558 of file thread_api_traits_impl.hpp.

◆ set_backtrace_on_terminate() [1/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::set_backtrace_on_terminate ( )
inlinenoexcept

Definition at line 107 of file thread_api_traits_impl.hpp.

◆ set_backtrace_on_terminate() [2/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::api_type::posix_pthreads, sequential_mode >::set_backtrace_on_terminate ( )
inlinenoexcept

Definition at line 223 of file thread_api_traits_impl.hpp.

◆ set_backtrace_on_terminate() [3/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::set_backtrace_on_terminate ( )
staticnoexcept

Dump a backtrace to std::cerr if std::terminate is called, once this function is called.

◆ set_backtrace_on_terminate() [4/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::set_backtrace_on_terminate ( )
inlinenoexcept

Definition at line 312 of file thread_api_traits_impl.hpp.

◆ set_backtrace_on_terminate() [5/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::api_type::posix_pthreads, heavyweight_threading >::set_backtrace_on_terminate ( )
inlinenoexcept

Definition at line 563 of file thread_api_traits_impl.hpp.

◆ set_cancelstate() [1/5]

◆ set_cancelstate() [2/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::set_cancelstate ( api_params_type::thread_cancel_state  )
inline

Definition at line 176 of file thread_api_traits_impl.hpp.

◆ set_cancelstate() [3/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::set_cancelstate ( api_params_type::thread_cancel_state  )
inline

Definition at line 283 of file thread_api_traits_impl.hpp.

◆ set_cancelstate() [4/5]

◆ set_cancelstate() [5/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::set_cancelstate ( typename api_params_type::thread_cancel_state  state)
staticnoexcept

◆ set_kernel_affinity() [1/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::set_kernel_affinity ( api_params_type::handle_type const  thread_handle,
api_params_type::processor_mask_type const  mask 
)
inline

Definition at line 254 of file thread_api_traits_impl.hpp.

◆ set_kernel_affinity() [2/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::set_kernel_affinity ( api_params_type::handle_type const  ,
api_params_type::processor_mask_type const   
)
inline

Definition at line 167 of file thread_api_traits_impl.hpp.

◆ set_kernel_affinity() [3/5]

Definition at line 451 of file thread_api_traits_impl.hpp.

◆ set_kernel_affinity() [4/5]

Definition at line 277 of file thread_api_traits_impl.hpp.

◆ set_kernel_affinity() [5/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::set_kernel_affinity ( typename api_params_type::handle_type const  ,
typename api_params_type::processor_mask_type const   
)
staticnoexcept

◆ set_kernel_priority() [1/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::set_kernel_priority ( api_params_type::handle_type  thread,
const api_params_type::priority_type  priority 
)
inline

Definition at line 242 of file thread_api_traits_impl.hpp.

◆ set_kernel_priority() [2/5]

◆ set_kernel_priority() [3/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::set_kernel_priority ( api_params_type::handle_type  ,
const api_params_type::priority_type   
)
inline

Definition at line 158 of file thread_api_traits_impl.hpp.

◆ set_kernel_priority() [4/5]

◆ set_kernel_priority() [5/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::set_kernel_priority ( typename api_params_type::handle_type  ,
const typename api_params_type::priority_type   
)
staticnoexcept

◆ sleep() [1/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::sleep ( const api_params_type::suspend_period_ms  period)
inline

Definition at line 287 of file thread_api_traits_impl.hpp.

◆ sleep() [2/5]

◆ sleep() [3/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::sleep ( const api_params_type::suspend_period_ms  )
inline

Definition at line 180 of file thread_api_traits_impl.hpp.

◆ sleep() [4/5]

◆ sleep() [5/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::sleep ( const typename api_params_type::suspend_period_ms  period)
staticnoexcept

Sort-of threading, as it suspends the current thread of execution.

Parameters
periodThe period to sleep in ms. A value of zero should cause the thread to yield, so that it is no longer in a running state. (The rest of its time-slice is re-scheduled to run at some later period.)

◆ state() [1/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::states __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::state ( api_params_type )
inlinenoexcept

Definition at line 141 of file thread_api_traits_impl.hpp.

◆ state() [2/5]

◆ state() [3/5]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::states __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::state ( api_params_type )
staticnoexcept

◆ state() [4/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::states __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::state ( api_params_type thread)
inline

Definition at line 215 of file thread_api_traits_impl.hpp.

◆ state() [5/5]

◆ suspend() [1/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::suspend_count __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::suspend ( api_params_type const &  )
inlinenoexcept

Definition at line 129 of file thread_api_traits_impl.hpp.

◆ suspend() [2/5]

◆ suspend() [3/5]

◆ suspend() [4/5]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::suspend_count __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::suspend ( api_params_type const &  )
staticnoexcept

◆ suspend() [5/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::suspend_count __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::suspend ( api_params_type const &  thread)
inline

Definition at line 199 of file thread_api_traits_impl.hpp.

◆ terminate() [1/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::terminate ( api_params_type const &  thread)
inline

Definition at line 230 of file thread_api_traits_impl.hpp.

◆ terminate() [2/5]

◆ terminate() [3/5]

template<>
void __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::terminate ( api_params_type::handle_type  )
inline

Definition at line 150 of file thread_api_traits_impl.hpp.

◆ terminate() [4/5]

◆ terminate() [5/5]

template<generic_traits::api_type API, typename Mdl>
static void __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::terminate ( typename api_params_type::handle_type  )
staticnoexcept

Request or force that the target thread exit.

Note that this may result in undefined behaviour depending upon how the underlying OS copes with cleaning the state loaded by the thread.

◆ wait_thread_exit() [1/5]

◆ wait_thread_exit() [2/5]

template<>
api_threading_traits< generic_traits::MS_Win32, sequential_mode >::api_params_type::states __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, sequential_mode >::wait_thread_exit ( api_params_type ,
const lock_traits::timeout_type   
)
inlinenoexcept

Definition at line 184 of file thread_api_traits_impl.hpp.

◆ wait_thread_exit() [3/5]

template<generic_traits::api_type API, typename Mdl>
static api_params_type::states __fastcall jmmcg::ppd::api_threading_traits< API, Mdl >::wait_thread_exit ( api_params_type ,
const typename lock_traits::timeout_type  period 
)
staticnoexcept

◆ wait_thread_exit() [4/5]

template<>
api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::api_params_type::states __fastcall jmmcg::ppd::api_threading_traits< generic_traits::MS_Win32, heavyweight_threading >::wait_thread_exit ( api_params_type params,
const lock_traits::timeout_type  period 
)
inline

Definition at line 292 of file thread_api_traits_impl.hpp.

◆ wait_thread_exit() [5/5]

Member Data Documentation

◆ max_num_fn_ptrs

template<generic_traits::api_type API, typename Mdl>
constexpr int jmmcg::ppd::api_threading_traits< API, Mdl >::max_num_fn_ptrs =100
staticconstexpr

100 functions in the stack frame should be enough for anyone... Eeek!

Definition at line 257 of file thread_api_traits.hpp.


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