File: atomic.hpp

package info (click to toggle)
supercollider 1%3A3.11.2%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 71,152 kB
  • sloc: cpp: 387,846; lisp: 80,328; ansic: 76,515; sh: 22,779; python: 7,932; makefile: 2,333; perl: 1,123; javascript: 915; java: 677; xml: 582; yacc: 314; lex: 175; objc: 152; ruby: 136
file content (71 lines) | stat: -rwxr-xr-x 1,355 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// atomic.hpp: pull in std::atomic or boost::atomic
//
// Copyright (C) 2013 Tim Blechmann
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_SYNC_DETAIL_ATOMIC_HPP
#define BOOST_SYNC_DETAIL_ATOMIC_HPP

#include <boost/sync/detail/config.hpp>

#if !defined(BOOST_SYNC_USE_STD_ATOMIC)

#if defined(BOOST_CLANG)

// Clang can be used with libstdc++, which only enables C++11 headers when explicitly enabled in the command line.
#if (__cplusplus >= 201103L) && __has_include( <atomic> )
#define BOOST_SYNC_USE_STD_ATOMIC
#endif

#elif defined(BOOST_MSVC)

#if (BOOST_MSVC >= 1700)
#define BOOST_SYNC_USE_STD_ATOMIC
#endif

#elif defined(BOOST_GCC)

#if (BOOST_GCC >= 40800) && (__cplusplus >= 201103L)
#define BOOST_SYNC_USE_STD_ATOMIC
#endif

#endif

#endif // !defined(BOOST_SYNC_USE_STD_ATOMIC)

#ifdef BOOST_SYNC_USE_STD_ATOMIC
#include <atomic>
#else
#include <boost/atomic.hpp>
#endif

#include <boost/sync/detail/header.hpp>

#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif

namespace boost  {
namespace sync   {
namespace detail {

#ifdef BOOST_SYNC_USE_STD_ATOMIC

namespace atomic_ns = std;

#else

namespace atomic_ns = boost;

#endif

}
}
}

#include <boost/sync/detail/footer.hpp>

#endif // BOOST_SYNC_DETAIL_ATOMIC_HPP