jaulib v1.3.0
Jau Support Library (C++, Java, ..)
Public Member Functions | List of all members
jau::sc_atomic_critical Class Reference

This class provides a RAII-style Sequentially Consistent (SC) data race free (DRF) critical block. More...

#include <ordered_atomic.hpp>

Collaboration diagram for jau::sc_atomic_critical:

Public Member Functions

 sc_atomic_critical () noexcept=delete
 
 sc_atomic_critical (const sc_atomic_critical &)=delete
 
 sc_atomic_critical (sc_atomic_bool &sync) noexcept
 SC-DRF acquire via sc_atomic_bool::load() More...
 
 ~sc_atomic_critical () noexcept
 SC-DRF release via sc_atomic_bool::store() More...
 
sc_atomic_criticaloperator= (const sc_atomic_critical &) volatile=delete
 
sc_atomic_criticaloperator= (const sc_atomic_critical &)=delete
 

Detailed Description

This class provides a RAII-style Sequentially Consistent (SC) data race free (DRF) critical block.

RAII-style SC-DRF acquire via constructor and SC-DRF release via destructor, providing a DRF critical block.

This temporary object reuses a jau::sc_atomic_bool atomic synchronization element. The type of the acting atomic is not relevant, only its atomic SC-DRF properties.

See also:


Definition at line 340 of file ordered_atomic.hpp.

Constructor & Destructor Documentation

◆ sc_atomic_critical() [1/3]

jau::sc_atomic_critical::sc_atomic_critical ( sc_atomic_bool sync)
inlinenoexcept

SC-DRF acquire via sc_atomic_bool::load()

Definition at line 347 of file ordered_atomic.hpp.

◆ ~sc_atomic_critical()

jau::sc_atomic_critical::~sc_atomic_critical ( )
inlinenoexcept

SC-DRF release via sc_atomic_bool::store()

Definition at line 350 of file ordered_atomic.hpp.

◆ sc_atomic_critical() [2/3]

jau::sc_atomic_critical::sc_atomic_critical ( )
deletenoexcept

◆ sc_atomic_critical() [3/3]

jau::sc_atomic_critical::sc_atomic_critical ( const sc_atomic_critical )
delete

Member Function Documentation

◆ operator=() [1/2]

sc_atomic_critical & jau::sc_atomic_critical::operator= ( const sc_atomic_critical )
delete

◆ operator=() [2/2]

sc_atomic_critical & jau::sc_atomic_critical::operator= ( const sc_atomic_critical ) volatile
delete

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