libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore Class Reference

#include <posix_locking.hpp>

Inheritance diagram for jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore:
[legend]
Collaboration diagram for jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore:
[legend]

Public Types

typedef lock::lockable_settable< api_lock_traits< ppd::generic_traits::api_type::posix_pthreads, heavyweight_threading > > base_t
 
typedef base_t::lock_traits lock_traits
 
typedef base_t::atomic_state_type atomic_state_type
 
typedef lock_traits::exception_type exception_type
 
typedef anon_semaphore atomic_t
 
typedef atomic_t::count_type count_type
 
typedef lock::in_process< semaphorelock_type
 
typedef lock_type read_lock_type
 
typedef lock_type write_lock_type
 
using api_event_type = lock_traits::api_event_type
 
- Public Types inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::lock::lockable_settable< api_lock_traits< ppd::generic_traits::api_type::posix_pthreads, heavyweight_threading > >
using lock_traits = api_lock_traits< ppd::generic_traits::api_type::posix_pthreads, heavyweight_threading >
 
typedef lock_traits::atomic_state_type atomic_state_type
 
- Public Types inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::lock::lockable< api_lock_traits< ppd::generic_traits::api_type::posix_pthreads, heavyweight_threading > >
using lock_traits = api_lock_traits< ppd::generic_traits::api_type::posix_pthreads, heavyweight_threading >
 
typedef lock_traits::atomic_state_type atomic_state_type
 
typedef lock_traits::timeout_type timeout_type
 
- Public Types inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::lock::settable< LkT >
using lock_traits = LkT
 
typedef lock_traits::atomic_state_type atomic_state_type
 

Public Member Functions

__stdcall semaphore (const atomic_state_type state=lock_traits::atom_set) noexcept(false) FORCE_INLINE
 
 semaphore (semaphore const &)=delete
 
__stdcall ~semaphore () noexcept(true) FORCE_INLINE
 
 operator api_event_type * () noexcept(true) FORCE_INLINE
 
atomic_state_type __fastcall set () noexcept(true) override FORCE_INLINE
 
atomic_state_type __fastcall reset () noexcept(true) override FORCE_INLINE
 
atomic_state_type __fastcall try_lock () noexcept(true) override FORCE_INLINE
 
atomic_state_type __fastcall lock () noexcept(false) override FORCE_INLINE
 
atomic_state_type __fastcall unlock () noexcept(true) override
 
void decay () noexcept(true) FORCE_INLINE
 
count_type __fastcall count () const noexcept(true) FORCE_INLINE
 

Static Public Attributes

static constexpr generic_traits::memory_access_modes memory_access_mode =atomic_t::memory_access_mode
 
- Static Public Attributes inherited from jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::lock::lockable_settable< api_lock_traits< ppd::generic_traits::api_type::posix_pthreads, heavyweight_threading > >
static constexpr generic_traits::memory_access_modes memory_access_mode
 

Protected Member Functions

atomic_state_type __fastcall lock (const timeout_type period) noexcept(false) override FORCE_INLINE
 

Detailed Description

Definition at line 192 of file posix_locking.hpp.

Member Typedef Documentation

◆ api_event_type

Definition at line 203 of file posix_locking.hpp.

◆ atomic_state_type

◆ atomic_t

◆ base_t

◆ count_type

◆ exception_type

Definition at line 197 of file posix_locking.hpp.

◆ lock_traits

◆ lock_type

◆ read_lock_type

◆ write_lock_type

Constructor & Destructor Documentation

◆ semaphore() [1/2]

__stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::semaphore ( const atomic_state_type  state = lock_traits::atom_set)
inlineexplicitnoexcept

Manual reset and initially signalled.

Definition at line 213 of file posix_locking.hpp.

References semaphore().

Referenced by semaphore().

◆ semaphore() [2/2]

jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::semaphore ( semaphore const &  )
delete

◆ ~semaphore()

__stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::~semaphore ( )
inlinenoexcept

Definition at line 217 of file posix_locking.hpp.

Member Function Documentation

◆ count()

count_type __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::count ( ) const
inlinenoexcept

Definition at line 238 of file posix_locking.hpp.

◆ decay()

void jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::decay ( )
inlinenoexcept

Definition at line 237 of file posix_locking.hpp.

◆ lock() [1/2]

atomic_state_type __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::lock ( )
inlineoverridevirtualnoexcept

◆ lock() [2/2]

atomic_state_type __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::lock ( const timeout_type  period)
inlineoverrideprotectedvirtualnoexcept

◆ operator api_event_type *()

jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::operator api_event_type * ( )
inlinenoexcept

Definition at line 219 of file posix_locking.hpp.

◆ reset()

atomic_state_type __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::reset ( void  )
inlineoverridevirtualnoexcept

◆ set()

atomic_state_type __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::set ( void  )
inlineoverridevirtualnoexcept

◆ try_lock()

atomic_state_type __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::try_lock ( )
inlineoverridevirtualnoexcept

◆ unlock()

atomic_state_type __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::unlock ( )
inlineoverridevirtualnoexcept

Member Data Documentation

◆ memory_access_mode

constexpr generic_traits::memory_access_modes jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pthreads::semaphore::memory_access_mode =atomic_t::memory_access_mode
staticconstexpr

To assist in allowing compile-time computation of the algorithmic order of the threading model.

Definition at line 208 of file posix_locking.hpp.


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