~ubuntu-branches/ubuntu/wily/bombono-dvd/wily

« back to all changes in this revision

Viewing changes to libs/boost-lib/boost/smart_ptr/detail/spinlock.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-11-04 11:46:25 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20101104114625-8xfdhvhpsm51i0nu
Tags: upstream-0.8.0
ImportĀ upstreamĀ versionĀ 0.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
 
2
#define BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
 
3
 
 
4
// MS compatible compilers support #pragma once
 
5
 
 
6
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
 
7
# pragma once
 
8
#endif
 
9
 
 
10
//
 
11
//  boost/detail/spinlock.hpp
 
12
//
 
13
//  Copyright (c) 2008 Peter Dimov
 
14
//
 
15
//  Distributed under the Boost Software License, Version 1.0.
 
16
//  See accompanying file LICENSE_1_0.txt or copy at
 
17
//  http://www.boost.org/LICENSE_1_0.txt)
 
18
//
 
19
//  struct spinlock
 
20
//  {
 
21
//      void lock();
 
22
//      bool try_lock();
 
23
//      void unlock();
 
24
//
 
25
//      class scoped_lock;
 
26
//  };
 
27
//
 
28
//  #define BOOST_DETAIL_SPINLOCK_INIT <unspecified>
 
29
//
 
30
 
 
31
#include <boost/config.hpp>
 
32
#include <boost/smart_ptr/detail/sp_has_sync.hpp>
 
33
 
 
34
#if defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
 
35
#  include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
 
36
 
 
37
#elif defined( BOOST_SP_HAS_SYNC )
 
38
#  include <boost/smart_ptr/detail/spinlock_sync.hpp>
 
39
 
 
40
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
 
41
#  include <boost/smart_ptr/detail/spinlock_w32.hpp>
 
42
 
 
43
#elif defined(BOOST_HAS_PTHREADS)
 
44
#  include <boost/smart_ptr/detail/spinlock_pt.hpp>
 
45
 
 
46
#elif !defined(BOOST_HAS_THREADS)
 
47
#  include <boost/smart_ptr/detail/spinlock_nt.hpp>
 
48
 
 
49
#else
 
50
#  error Unrecognized threading platform
 
51
#endif
 
52
 
 
53
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED