File indexing completed on 2025-12-16 10:10:03
0001 #ifndef BOOST_THREAD_WIN32_MUTEX_HPP
0002 #define BOOST_THREAD_WIN32_MUTEX_HPP
0003
0004
0005
0006
0007
0008
0009 #include <boost/thread/win32/basic_timed_mutex.hpp>
0010 #include <boost/thread/exceptions.hpp>
0011 #if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
0012 #include <boost/thread/lock_types.hpp>
0013 #endif
0014 #include <boost/thread/detail/delete.hpp>
0015
0016 #include <boost/config/abi_prefix.hpp>
0017
0018 namespace boost
0019 {
0020 namespace detail
0021 {
0022 typedef ::boost::detail::basic_timed_mutex underlying_mutex;
0023 }
0024
0025 class mutex:
0026 public ::boost::detail::underlying_mutex
0027 {
0028 public:
0029 BOOST_THREAD_NO_COPYABLE(mutex)
0030 mutex()
0031 {
0032 initialize();
0033 }
0034 ~mutex()
0035 {
0036 destroy();
0037 }
0038
0039 #if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
0040 typedef unique_lock<mutex> scoped_lock;
0041 typedef detail::try_lock_wrapper<mutex> scoped_try_lock;
0042 #endif
0043 };
0044
0045 typedef mutex try_mutex;
0046
0047 class timed_mutex:
0048 public ::boost::detail::basic_timed_mutex
0049 {
0050 public:
0051 BOOST_THREAD_NO_COPYABLE(timed_mutex)
0052 timed_mutex()
0053 {
0054 initialize();
0055 }
0056
0057 ~timed_mutex()
0058 {
0059 destroy();
0060 }
0061
0062 #if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
0063 typedef unique_lock<timed_mutex> scoped_timed_lock;
0064 typedef detail::try_lock_wrapper<timed_mutex> scoped_try_lock;
0065 typedef scoped_timed_lock scoped_lock;
0066 #endif
0067 };
0068 }
0069
0070 #include <boost/config/abi_suffix.hpp>
0071
0072 #endif