NEURON
nmodlmutex.h
Go to the documentation of this file.
1 #pragma once
2 #if NRN_ENABLE_THREADS
3 #include <memory>
4 #include <mutex>
5 
6 namespace nrn {
7 extern std::unique_ptr<std::mutex> nmodlmutex;
8 }
9 #define _NMODLMUTEXLOCK \
10  { \
11  if (nrn::nmodlmutex) { \
12  nrn::nmodlmutex->lock(); \
13  } \
14  }
15 #define _NMODLMUTEXUNLOCK \
16  { \
17  if (nrn::nmodlmutex) { \
18  nrn::nmodlmutex->unlock(); \
19  } \
20  }
21 #else
22 #define _NMODLMUTEXLOCK /**/
23 #define _NMODLMUTEXUNLOCK /**/
24 #endif
Definition: bimap.hpp:13
std::unique_ptr< std::mutex > nmodlmutex
Definition: multicore.cpp:82