Mutex

Located in file: MEL.hpp

Mutex MEL::MutexCreate(const int rank, const int size, const int root, const Comm &comm)

Create a MEL::Mutex across a comm world.

Parameters
  • rank -

    The rank of the calling process

  • size -

    The size of the comm world

  • root -

    The rank of the process who will own the mutex

  • comm -

    The comm world to share the mutex across

Mutex MEL::MutexCreate(const int root, const Comm &comm)

Create a MEL::Mutex across a comm world.

Parameters
  • root -

    The rank of the process who will own the mutex

  • comm -

    The comm world to share the mutex across

void MEL::MutexFree(Mutex &mutex)

Free a MEL::Mutex.

Parameters
  • mutex -

    The mutex to free

void MEL::MutexLock(Mutex &mutex)

Get the exclusive lock on a MEL::Mutex.

Parameters
  • mutex -

    The mutex to lock

bool MEL::MutexTest(const Mutex &mutex)

Test if the mutex is currently locked.

Parameters
  • mutex -

    The mutex to lock

void MEL::MutexUnlock(Mutex &mutex)

Release the exclusive lock on a MEL::Mutex.

Parameters
  • mutex -

    The mutex to lock