1#ifndef included_AMP_Mutex
2#define included_AMP_Mutex
32 explicit Mutex(
bool recursive );
Provides C++ wrapper around MPI routines.
Functions for locking/unlocking a mutex.
Mutex(const Mutex &)=delete
Copy constructor.
bool tryLock()
Try to lock the mutex and return true if successful.
Mutex & operator=(const Mutex &)=delete
Assignment operator.
void unlock()
Unlock the mutex.
void lock()
Lock the mutex.
Mutex()
Empty constructor (equivalent to Mutex(false) )
~Mutex()=default
Destructor.
bool ownLock() const
Return true if we already own the lock.
void lock_MPI_Mutex(AMP::Mutex &mutex, const AMP::AMP_MPI &comm)
Function to sycronize locking a mutex across a MPI communicator.