~ubuntu-branches/ubuntu/intrepid/asio/intrepid

« back to all changes in this revision

Viewing changes to include/asio/detail/mutex.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Simon Richter
  • Date: 2007-09-07 11:10:41 UTC
  • Revision ID: james.westby@ubuntu.com-20070907111041-f0uwhs0llvzj9ah5
Tags: upstream-0.3.8~rc3
ImportĀ upstreamĀ versionĀ 0.3.8~rc3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// mutex.hpp
 
3
// ~~~~~~~~~
 
4
//
 
5
// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 
6
//
 
7
// Distributed under the Boost Software License, Version 1.0. (See accompanying
 
8
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
9
//
 
10
 
 
11
#ifndef ASIO_DETAIL_MUTEX_HPP
 
12
#define ASIO_DETAIL_MUTEX_HPP
 
13
 
 
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
 
15
# pragma once
 
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
17
 
 
18
#include "asio/detail/push_options.hpp"
 
19
 
 
20
#include "asio/detail/push_options.hpp"
 
21
#include <boost/config.hpp>
 
22
#include "asio/detail/pop_options.hpp"
 
23
 
 
24
#if !defined(BOOST_HAS_THREADS)
 
25
# include "asio/detail/null_mutex.hpp"
 
26
#elif defined(BOOST_WINDOWS)
 
27
# include "asio/detail/win_mutex.hpp"
 
28
#elif defined(BOOST_HAS_PTHREADS)
 
29
# include "asio/detail/posix_mutex.hpp"
 
30
#else
 
31
# error Only Windows and POSIX are supported!
 
32
#endif
 
33
 
 
34
namespace asio {
 
35
namespace detail {
 
36
 
 
37
#if !defined(BOOST_HAS_THREADS)
 
38
typedef null_mutex mutex;
 
39
#elif defined(BOOST_WINDOWS)
 
40
typedef win_mutex mutex;
 
41
#elif defined(BOOST_HAS_PTHREADS)
 
42
typedef posix_mutex mutex;
 
43
#endif
 
44
 
 
45
} // namespace detail
 
46
} // namespace asio
 
47
 
 
48
#include "asio/detail/pop_options.hpp"
 
49
 
 
50
#endif // ASIO_DETAIL_MUTEX_HPP