fix doc example typo
[boost.git] / boost / thread / win32 / mutex.hpp
blobefe6241d408bebb1997dba1e04fae9b82fd44cc7
1 #ifndef BOOST_THREAD_WIN32_MUTEX_HPP
2 #define BOOST_THREAD_WIN32_MUTEX_HPP
3 // (C) Copyright 2005-7 Anthony Williams
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
8 #include "basic_timed_mutex.hpp"
9 #include <boost/utility.hpp>
10 #include <boost/thread/exceptions.hpp>
11 #include <boost/thread/locks.hpp>
13 #include <boost/config/abi_prefix.hpp>
15 namespace boost
17 namespace detail
19 typedef ::boost::detail::basic_timed_mutex underlying_mutex;
22 class mutex:
23 boost::noncopyable,
24 public ::boost::detail::underlying_mutex
26 public:
27 mutex()
29 initialize();
31 ~mutex()
33 destroy();
36 typedef unique_lock<mutex> scoped_lock;
37 typedef detail::try_lock_wrapper<mutex> scoped_try_lock;
40 typedef mutex try_mutex;
42 class timed_mutex:
43 boost::noncopyable,
44 public ::boost::detail::basic_timed_mutex
46 public:
47 timed_mutex()
49 initialize();
52 ~timed_mutex()
54 destroy();
57 typedef unique_lock<timed_mutex> scoped_timed_lock;
58 typedef detail::try_lock_wrapper<timed_mutex> scoped_try_lock;
59 typedef scoped_timed_lock scoped_lock;
63 #include <boost/config/abi_suffix.hpp>
65 #endif