Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ASIO_DETAIL_MUTEX_HPP
00012 #define ASIO_DETAIL_MUTEX_HPP
00013
00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00015 # pragma once
00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
00017
00018 #include "asio/detail/push_options.hpp"
00019
00020 #include "asio/detail/push_options.hpp"
00021 #include <boost/config.hpp>
00022 #include "asio/detail/pop_options.hpp"
00023
00024 #if !defined(BOOST_HAS_THREADS)
00025 # include "asio/detail/null_mutex.hpp"
00026 #elif defined(BOOST_WINDOWS)
00027 # include "asio/detail/win_mutex.hpp"
00028 #elif defined(BOOST_HAS_PTHREADS)
00029 # include "asio/detail/posix_mutex.hpp"
00030 #else
00031 # error Only Windows and POSIX are supported!
00032 #endif
00033
00034 namespace asio {
00035 namespace detail {
00036
00037 #if !defined(BOOST_HAS_THREADS)
00038 typedef null_mutex mutex;
00039 #elif defined(BOOST_WINDOWS)
00040 typedef win_mutex mutex;
00041 #elif defined(BOOST_HAS_PTHREADS)
00042 typedef posix_mutex mutex;
00043 #endif
00044
00045 }
00046 }
00047
00048 #include "asio/detail/pop_options.hpp"
00049
00050 #endif // ASIO_DETAIL_MUTEX_HPP