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

The various lock-types for sequential use, with no threading. More...

#include <thread_api_traits.hpp>

Inheritance diagram for jmmcg::ppd::api_lock_traits< platform_api, sequential_mode >:
[legend]

Classes

struct  scoped_lock
 

Public Types

enum  atomic_state_type {
  atom_set =0, atom_abandoned, atom_already_set, atom_max_recurse,
  atom_deadlocked, atom_perm_error, atom_failed, atom_interrupted,
  atom_nomemory, atom_unset, atom_errno
}
 
typedef sequential_mode model_type
 
typedef int handle_type
 
typedef no_locking::critical_section anon_mutex_type
 
typedef no_locking::critical_section nonrecursive_anon_mutex_type
 
typedef no_locking::critical_section recursive_anon_mutex_type
 
typedef no_locking::anon_event anon_event_type
 
typedef no_locking::critical_section critical_section_type
 
typedef no_locking::critical_section recursive_critical_section_type
 
typedef no_locking::critical_section mutex_type
 
typedef no_locking::critical_section recursive_mutex_type
 
typedef no_locking::anon_event event_type
 
typedef no_locking::anon_event anon_semaphore_type
 
typedef no_locking::anon_event semaphore_type
 
template<class V >
using atomic_counter_type = atomic_ctr< V, api_lock_traits< api_type, model_type > >
 
template<class V >
using noop_atomic_ctr = noop_atomic_ctr_base< V, api_lock_traits< api_type, model_type > >
 
template<class V >
using atomic = atomic_ctr< V, api_lock_traits< api_type, model_type > >
 
using timeout_type = int
 
using exception_type = crt_exception< platform_api, sequential_mode >
 

Static Public Member Functions

static constexpr timeout_type infinite_timeout () noexcept(true) FORCE_INLINE
 

Static Public Attributes

static constexpr generic_traits::api_type api_type =platform_api
 

Detailed Description

template<>
struct jmmcg::ppd::api_lock_traits< platform_api, sequential_mode >

The various lock-types for sequential use, with no threading.

Definition at line 84 of file thread_api_traits.hpp.

Member Typedef Documentation

◆ anon_event_type

◆ anon_mutex_type

◆ anon_semaphore_type

◆ atomic

Definition at line 122 of file thread_api_traits.hpp.

◆ atomic_counter_type

This counter-type may not use a mutex_type to protect the counter, it may use the underlying API to provide a lock-free atomic counter. It is 2-5 times faster than the atomic_counter_type, also the CPU load on two processors is close to 100% in certain performance tests.

Definition at line 118 of file thread_api_traits.hpp.

◆ critical_section_type

◆ event_type

◆ exception_type

Definition at line 129 of file thread_api_traits.hpp.

◆ handle_type

Definition at line 101 of file thread_api_traits.hpp.

◆ model_type

Definition at line 86 of file thread_api_traits.hpp.

◆ mutex_type

◆ nonrecursive_anon_mutex_type

◆ noop_atomic_ctr

Definition at line 120 of file thread_api_traits.hpp.

◆ recursive_anon_mutex_type

◆ recursive_critical_section_type

◆ recursive_mutex_type

◆ semaphore_type

◆ timeout_type

Definition at line 123 of file thread_api_traits.hpp.

Member Enumeration Documentation

◆ atomic_state_type

Enumerator
atom_set 
atom_abandoned 
atom_already_set 
atom_max_recurse 
atom_deadlocked 
atom_perm_error 
atom_failed 
atom_interrupted 
atom_nomemory 
atom_unset 
atom_errno 

Definition at line 87 of file thread_api_traits.hpp.

Member Function Documentation

◆ infinite_timeout()

static constexpr timeout_type jmmcg::ppd::api_lock_traits< platform_api, sequential_mode >::infinite_timeout ( )
inlinestaticconstexprnoexcept

Definition at line 131 of file thread_api_traits.hpp.

Member Data Documentation

◆ api_type

constexpr generic_traits::api_type jmmcg::ppd::api_lock_traits< platform_api, sequential_mode >::api_type =platform_api
staticconstexpr

Definition at line 85 of file thread_api_traits.hpp.


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