21 #ifndef CLASP_UTIL_MUTEX_H_INCLUDED
22 #define CLASP_UTIL_MUTEX_H_INCLUDED
26 #define WIN32_LEAN_AND_MEAN // exclude APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets.
27 #define NOMINMAX // do not let windows.h define macros min and max
30 #include <tbb/mutex.h>
31 #include <tbb/spin_mutex.h>
32 #if defined(TBB_IMPLEMENT_CPP0X)
33 #define RESTORE_TBB_IMPLEMENT_CPP0X TBB_IMPLEMENT_CPP0X
34 #undef TBB_IMPLEMENT_CPP0X
36 #define TBB_IMPLEMENT_CPP0X 0
37 #include <tbb/compat/condition_variable>
38 #undef TBB_IMPLEMENT_CPP0X
39 #if defined(RESTORE_TBB_IMPLEMENT_CPP0X)
40 #define TBB_IMPLEMENT_CPP0X RESTORE_TBB_IMPLEMENT_CPP0X
41 #undef RESTORE_TBB_IMPLEMENT_CPP0X
46 using tbb::interface5::condition_variable;
47 using tbb::interface5::lock_guard;
48 using tbb::interface5::unique_lock;
50 using tbb::interface5::defer_lock_t;
53 namespace no_multi_threading {
~lock_guard()
Definition: mutex.h:71
bool try_lock()
Definition: mutex.h:58
void swap(Literal &l, Literal &r)
Definition: literal.h:188
NullMutex mutex
Definition: mutex.h:64
NullMutex spin_mutex
Definition: mutex.h:65
lock_guard(mutex_type &m)
Definition: mutex.h:70
void unlock()
Definition: mutex.h:59
void lock()
Definition: mutex.h:57
M mutex_type
Definition: mutex.h:69
NullMutex()
Definition: mutex.h:56