7bd3533c3702243ff299158fd28cfcf78be39564
[libcds.git] / cds / details / std / mutex.h
1 //$$CDS-header$$
2
3 #ifndef __CDS_DETAILS_STD_MUTEX_H
4 #define __CDS_DETAILS_STD_MUTEX_H
5
6 //@cond
7
8 #include <cds/details/defs.h>
9
10 #ifdef CDS_CXX11_STDLIB_MUTEX
11 #   include <mutex>
12     namespace cds_std {
13         using std::mutex;
14         using std::recursive_mutex;
15         using std::unique_lock;
16         using std::lock_guard;
17         using std::adopt_lock_t;
18     }
19 #else
20 #   include <boost/thread/mutex.hpp>
21 #   include <boost/thread/recursive_mutex.hpp>
22 #   if BOOST_VERSION >= 105300
23 #       include <boost/thread/locks.hpp>
24 #       include <boost/thread/lock_guard.hpp>
25 #   else
26 #       include <boost/thread.hpp>
27 #   endif
28     namespace cds_std {
29         using boost::mutex;
30         using boost::recursive_mutex;
31         using boost::unique_lock;
32         using boost::lock_guard;
33         using boost::adopt_lock_t;
34     }
35 #endif
36
37 //@endcond
38
39 #endif // #ifndef __CDS_DETAILS_STD_MUTEX_H