Peano
Loading...
Searching...
No Matches
tarch::mpi::Lock Class Reference

Create a lock around a boolean semaphore region. More...

#include <Lock.h>

Collaboration diagram for tarch::mpi::Lock:

Public Member Functions

 Lock (tarch::mpi::BooleanSemaphore &semaphore, bool aquireLockImmediately=true)
 
 ~Lock ()
 
void lock ()
 
void free ()
 

Private Attributes

BooleanSemaphore_semaphore
 
bool _lockIsAquired
 

Detailed Description

Create a lock around a boolean semaphore region.

See also
tarch::mpi::BooleanSemaphore

Definition at line 20 of file Lock.h.

Constructor & Destructor Documentation

◆ Lock()

tarch::mpi::Lock::Lock ( tarch::mpi::BooleanSemaphore & semaphore,
bool aquireLockImmediately = true )

Definition at line 6 of file Lock.cpp.

References lock().

Here is the call graph for this function:

◆ ~Lock()

tarch::mpi::Lock::~Lock ( )

Definition at line 15 of file Lock.cpp.

Member Function Documentation

◆ free()

void tarch::mpi::Lock::free ( )

Definition at line 29 of file Lock.cpp.

References assertion.

◆ lock()

void tarch::mpi::Lock::lock ( )

Definition at line 22 of file Lock.cpp.

References assertion.

Referenced by Lock().

Here is the caller graph for this function:

Field Documentation

◆ _lockIsAquired

bool tarch::mpi::Lock::_lockIsAquired
private

Definition at line 23 of file Lock.h.

◆ _semaphore

BooleanSemaphore& tarch::mpi::Lock::_semaphore
private

Definition at line 22 of file Lock.h.


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