Xmipp
v3.23.11-Nereus
|
#include <xmipp_mpi.h>
Public Member Functions | |
MpiFileMutex (const std::shared_ptr< MpiNode > &node) | |
~MpiFileMutex () | |
void | lock () |
void | unlock () |
Public Member Functions inherited from Mutex | |
Mutex () | |
virtual | ~Mutex () |
Public Attributes | |
char | lockFilename [L_tmpnam] |
Protected Attributes | |
std::shared_ptr< MpiNode > | node |
int | lockFile |
bool | fileCreator |
Mutex on files. This class extends threads mutex to also provide file locking.
Definition at line 118 of file xmipp_mpi.h.
MpiFileMutex::MpiFileMutex | ( | const std::shared_ptr< MpiNode > & | node | ) |
MpiFileMutex::~MpiFileMutex | ( | ) |
|
virtual |
Function to get the access to the mutex. If the some thread has the mutex and other ask to lock will be waiting until the first one release the mutex
Reimplemented from Mutex.
Definition at line 117 of file xmipp_mpi.cpp.
|
virtual |
Function to release the mutex. This allow the access to the mutex to other threads that are waiting for it.
Reimplemented from Mutex.
Definition at line 125 of file xmipp_mpi.cpp.
|
protected |
Definition at line 123 of file xmipp_mpi.h.
|
protected |
Definition at line 122 of file xmipp_mpi.h.
char MpiFileMutex::lockFilename[L_tmpnam] |
Definition at line 144 of file xmipp_mpi.h.
|
protected |
Definition at line 121 of file xmipp_mpi.h.