Wrap uses of thread_mpi/mutex.h
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 5 Jul 2015 04:12:43 +0000 (07:12 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 7 Jul 2015 07:34:33 +0000 (09:34 +0200)
Introduce gmx::Mutex and gmx::lock_guard to hide the actual C++ mutex
implementation used, and make all code that was using tMPI::Mutex use
these.

For now, the implementation is just directly imported from thread-MPI,
but this allows changing the implementation (e.g., to C++11 std::mutex
or to a TBB mutex) when thread-MPI is no longer appropriate, with mainly
changing this single header.  Also, this makes it clearer to introduce
new C++ wrappers for things like tMPI_Lock_t, as they can now be written
in this wrapper layer, instead of in thread-MPI where they will
introduce additional such dependencies.

Change-Id: Ie4c91d4e74c5dbc5e4d2b5d7fb5a76b73ef5616b


No differences found