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