]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #ifndef BOOST_THREAD_SHARED_MUTEX_HPP |
2 | #define BOOST_THREAD_SHARED_MUTEX_HPP | |
3 | ||
4 | // shared_mutex.hpp | |
5 | // | |
6 | // (C) Copyright 2007 Anthony Williams | |
7 | // (C) Copyright 2011-2012 Vicente J. Botet Escriba | |
8 | // | |
9 | // Distributed under the Boost Software License, Version 1.0. (See | |
10 | // accompanying file LICENSE_1_0.txt or copy at | |
11 | // http://www.boost.org/LICENSE_1_0.txt) | |
12 | ||
13 | #include <boost/thread/detail/config.hpp> | |
14 | #if defined(BOOST_THREAD_PLATFORM_WIN32) | |
15 | #if defined(BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN) | |
16 | #include <boost/thread/pthread/shared_mutex.hpp> | |
17 | #else | |
18 | #include <boost/thread/win32/shared_mutex.hpp> | |
19 | #endif | |
20 | #elif defined(BOOST_THREAD_PLATFORM_PTHREAD) | |
21 | //#include <boost/thread/v2/shared_mutex.hpp> | |
22 | #include <boost/thread/pthread/shared_mutex.hpp> | |
23 | #else | |
24 | #error "Boost threads unavailable on this platform" | |
25 | #endif | |
26 | ||
27 | #include <boost/thread/lockable_traits.hpp> | |
28 | ||
29 | namespace boost | |
30 | { | |
31 | typedef shared_mutex shared_timed_mutex; | |
32 | namespace sync | |
33 | { | |
34 | #ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES | |
35 | template<> | |
36 | struct is_basic_lockable<shared_mutex> | |
37 | { | |
38 | BOOST_STATIC_CONSTANT(bool, value = true); | |
39 | }; | |
40 | template<> | |
41 | struct is_lockable<shared_mutex> | |
42 | { | |
43 | BOOST_STATIC_CONSTANT(bool, value = true); | |
44 | }; | |
45 | #endif | |
46 | ||
47 | } | |
48 | } | |
49 | ||
50 | #endif |