nmodlmutex.h
Go to the documentation of this file.00001 #ifndef nmodlmutex_h
00002 #define nmodlmutex_h
00003
00004 #include <nrnpthread.h>
00005 #if USE_PTHREAD
00006 #include <pthread.h>
00007 extern pthread_mutex_t* _nmodlmutex;
00008 #define _NMODLMUTEXLOCK {if (_nmodlmutex) { pthread_mutex_lock(_nmodlmutex); }}
00009 #define _NMODLMUTEXUNLOCK {if (_nmodlmutex) { pthread_mutex_unlock(_nmodlmutex); }}
00010 #else
00011 #define _NMODLMUTEXLOCK
00012 #define _NMODLMUTEXUNLOCK
00013 #endif
00014
00015 #endif