ACE 8.0.1
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ACE_RWLock_Invariants Class Reference

RWLock Invariants. More...

#include <Token_Invariants.h>

Public Member Functions

 ACE_RWLock_Invariants ()=default
 Default construction.
 
int writer_acquired ()
 
int reader_acquired ()
 
void releasing ()
 Updates internal database.
 
 ACE_RWLock_Invariants (const ACE_RWLock_Invariants &rhs)=default
 Copy construction.
 
void operator= (const ACE_RWLock_Invariants &rhs)=default
 Copy.
 
void dump () const
 Dump the state of the class.
 

Private Attributes

int writers_ {}
 Number of owning writers.
 
int readers_ {}
 Number of owning readers.
 

Detailed Description

RWLock Invariants.

Preserve the following invariants:

  1. Only one writer at a time.
  2. If there is an owning writer, there are no owning readers.

Constructor & Destructor Documentation

◆ ACE_RWLock_Invariants() [1/2]

ACE_RWLock_Invariants::ACE_RWLock_Invariants ( )
default

Default construction.

◆ ACE_RWLock_Invariants() [2/2]

ACE_RWLock_Invariants::ACE_RWLock_Invariants ( const ACE_RWLock_Invariants & rhs)
default

Copy construction.

Member Function Documentation

◆ dump()

void ACE_RWLock_Invariants::dump ( ) const

Dump the state of the class.

◆ operator=()

void ACE_RWLock_Invariants::operator= ( const ACE_RWLock_Invariants & rhs)
default

Copy.

◆ reader_acquired()

int ACE_RWLock_Invariants::reader_acquired ( )

Returns 1 on success, 0 when an invariant has been violated and -1 on error.

◆ releasing()

void ACE_RWLock_Invariants::releasing ( )

Updates internal database.

◆ writer_acquired()

int ACE_RWLock_Invariants::writer_acquired ( )

Returns 1 on success, 0 when an invariant has been violated and -1 on error.

Member Data Documentation

◆ readers_

int ACE_RWLock_Invariants::readers_ {}
private

Number of owning readers.

◆ writers_

int ACE_RWLock_Invariants::writers_ {}
private

Number of owning writers.


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