]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /* Copyright 2006-2008 Joaquin M Lopez Munoz. |
2 | * Distributed under the Boost Software License, Version 1.0. | |
3 | * (See accompanying file LICENSE_1_0.txt or copy at | |
4 | * http://www.boost.org/LICENSE_1_0.txt) | |
5 | * | |
6 | * See http://www.boost.org/libs/flyweight for library home page. | |
7 | */ | |
8 | ||
9 | #ifndef BOOST_FLYWEIGHT_SIMPLE_LOCKING_HPP | |
10 | #define BOOST_FLYWEIGHT_SIMPLE_LOCKING_HPP | |
11 | ||
12 | #if defined(_MSC_VER) | |
13 | #pragma once | |
14 | #endif | |
15 | ||
16 | #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ | |
17 | #include <boost/flyweight/detail/recursive_lw_mutex.hpp> | |
18 | #include <boost/flyweight/simple_locking_fwd.hpp> | |
19 | #include <boost/flyweight/locking_tag.hpp> | |
20 | ||
21 | /* simple locking policy based on native recursive mutexes */ | |
22 | ||
23 | namespace boost{ | |
24 | ||
25 | namespace flyweights{ | |
26 | ||
27 | struct simple_locking:locking_marker | |
28 | { | |
29 | typedef detail::recursive_lightweight_mutex mutex_type; | |
30 | typedef mutex_type::scoped_lock lock_type; | |
31 | }; | |
32 | ||
33 | } /* namespace flyweights */ | |
34 | ||
35 | } /* namespace boost */ | |
36 | ||
37 | #endif |