Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / BH / include / boost / atomic / capabilities.hpp @ 2486

History | View | Annotate | Download (4.9 kB)

1 2486 sjacqu01
/*
2 2486 sjacqu01
 * Distributed under the Boost Software License, Version 1.0.
3 2486 sjacqu01
 * (See accompanying file LICENSE_1_0.txt or copy at
4 2486 sjacqu01
 * http://www.boost.org/LICENSE_1_0.txt)
5 2486 sjacqu01
 *
6 2486 sjacqu01
 * Copyright (c) 2014 Andrey Semashev
7 2486 sjacqu01
 */
8 2486 sjacqu01
/*!
9 2486 sjacqu01
 * \file   atomic/capabilities.hpp
10 2486 sjacqu01
 *
11 2486 sjacqu01
 * This header defines feature capabilities macros.
12 2486 sjacqu01
 */
13 2486 sjacqu01
14 2486 sjacqu01
#ifndef BOOST_ATOMIC_CAPABILITIES_HPP_INCLUDED_
15 2486 sjacqu01
#define BOOST_ATOMIC_CAPABILITIES_HPP_INCLUDED_
16 2486 sjacqu01
17 2486 sjacqu01
#include <boost/atomic/detail/config.hpp>
18 2486 sjacqu01
#include <boost/atomic/detail/platform.hpp>
19 2486 sjacqu01
#include <boost/atomic/detail/int_sizes.hpp>
20 2486 sjacqu01
21 2486 sjacqu01
#if !defined(BOOST_ATOMIC_EMULATED)
22 2486 sjacqu01
#include BOOST_ATOMIC_DETAIL_HEADER(boost/atomic/detail/caps_)
23 2486 sjacqu01
#endif
24 2486 sjacqu01
25 2486 sjacqu01
#ifdef BOOST_HAS_PRAGMA_ONCE
26 2486 sjacqu01
#pragma once
27 2486 sjacqu01
#endif
28 2486 sjacqu01
29 2486 sjacqu01
#ifndef BOOST_ATOMIC_INT8_LOCK_FREE
30 2486 sjacqu01
#define BOOST_ATOMIC_INT8_LOCK_FREE 0
31 2486 sjacqu01
#endif
32 2486 sjacqu01
33 2486 sjacqu01
#ifndef BOOST_ATOMIC_INT16_LOCK_FREE
34 2486 sjacqu01
#define BOOST_ATOMIC_INT16_LOCK_FREE 0
35 2486 sjacqu01
#endif
36 2486 sjacqu01
37 2486 sjacqu01
#ifndef BOOST_ATOMIC_INT32_LOCK_FREE
38 2486 sjacqu01
#define BOOST_ATOMIC_INT32_LOCK_FREE 0
39 2486 sjacqu01
#endif
40 2486 sjacqu01
41 2486 sjacqu01
#ifndef BOOST_ATOMIC_INT64_LOCK_FREE
42 2486 sjacqu01
#define BOOST_ATOMIC_INT64_LOCK_FREE 0
43 2486 sjacqu01
#endif
44 2486 sjacqu01
45 2486 sjacqu01
#ifndef BOOST_ATOMIC_INT128_LOCK_FREE
46 2486 sjacqu01
#define BOOST_ATOMIC_INT128_LOCK_FREE 0
47 2486 sjacqu01
#endif
48 2486 sjacqu01
49 2486 sjacqu01
50 2486 sjacqu01
#ifndef BOOST_ATOMIC_CHAR_LOCK_FREE
51 2486 sjacqu01
#define BOOST_ATOMIC_CHAR_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
52 2486 sjacqu01
#endif
53 2486 sjacqu01
54 2486 sjacqu01
#ifndef BOOST_ATOMIC_CHAR16_T_LOCK_FREE
55 2486 sjacqu01
#define BOOST_ATOMIC_CHAR16_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
56 2486 sjacqu01
#endif
57 2486 sjacqu01
58 2486 sjacqu01
#ifndef BOOST_ATOMIC_CHAR32_T_LOCK_FREE
59 2486 sjacqu01
#define BOOST_ATOMIC_CHAR32_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
60 2486 sjacqu01
#endif
61 2486 sjacqu01
62 2486 sjacqu01
#ifndef BOOST_ATOMIC_WCHAR_T_LOCK_FREE
63 2486 sjacqu01
#if BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1
64 2486 sjacqu01
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
65 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2
66 2486 sjacqu01
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
67 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4
68 2486 sjacqu01
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
69 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8
70 2486 sjacqu01
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
71 2486 sjacqu01
#else
72 2486 sjacqu01
#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 0
73 2486 sjacqu01
#endif
74 2486 sjacqu01
#endif
75 2486 sjacqu01
76 2486 sjacqu01
#ifndef BOOST_ATOMIC_SHORT_LOCK_FREE
77 2486 sjacqu01
#if BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 1
78 2486 sjacqu01
#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
79 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 2
80 2486 sjacqu01
#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
81 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 4
82 2486 sjacqu01
#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
83 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 8
84 2486 sjacqu01
#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
85 2486 sjacqu01
#else
86 2486 sjacqu01
#define BOOST_ATOMIC_SHORT_LOCK_FREE 0
87 2486 sjacqu01
#endif
88 2486 sjacqu01
#endif
89 2486 sjacqu01
90 2486 sjacqu01
#ifndef BOOST_ATOMIC_INT_LOCK_FREE
91 2486 sjacqu01
#if BOOST_ATOMIC_DETAIL_SIZEOF_INT == 1
92 2486 sjacqu01
#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
93 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 2
94 2486 sjacqu01
#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
95 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 4
96 2486 sjacqu01
#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
97 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 8
98 2486 sjacqu01
#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
99 2486 sjacqu01
#else
100 2486 sjacqu01
#define BOOST_ATOMIC_INT_LOCK_FREE 0
101 2486 sjacqu01
#endif
102 2486 sjacqu01
#endif
103 2486 sjacqu01
104 2486 sjacqu01
#ifndef BOOST_ATOMIC_LONG_LOCK_FREE
105 2486 sjacqu01
#if BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 1
106 2486 sjacqu01
#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
107 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 2
108 2486 sjacqu01
#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
109 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 4
110 2486 sjacqu01
#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
111 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 8
112 2486 sjacqu01
#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
113 2486 sjacqu01
#else
114 2486 sjacqu01
#define BOOST_ATOMIC_LONG_LOCK_FREE 0
115 2486 sjacqu01
#endif
116 2486 sjacqu01
#endif
117 2486 sjacqu01
118 2486 sjacqu01
#ifndef BOOST_ATOMIC_LLONG_LOCK_FREE
119 2486 sjacqu01
#if BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 1
120 2486 sjacqu01
#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
121 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 2
122 2486 sjacqu01
#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE
123 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 4
124 2486 sjacqu01
#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
125 2486 sjacqu01
#elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 8
126 2486 sjacqu01
#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
127 2486 sjacqu01
#else
128 2486 sjacqu01
#define BOOST_ATOMIC_LLONG_LOCK_FREE 0
129 2486 sjacqu01
#endif
130 2486 sjacqu01
#endif
131 2486 sjacqu01
132 2486 sjacqu01
#ifndef BOOST_ATOMIC_POINTER_LOCK_FREE
133 2486 sjacqu01
#if (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 8
134 2486 sjacqu01
#define BOOST_ATOMIC_POINTER_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE
135 2486 sjacqu01
#elif (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 4
136 2486 sjacqu01
#define BOOST_ATOMIC_POINTER_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE
137 2486 sjacqu01
#else
138 2486 sjacqu01
#define BOOST_ATOMIC_POINTER_LOCK_FREE 0
139 2486 sjacqu01
#endif
140 2486 sjacqu01
#endif
141 2486 sjacqu01
142 2486 sjacqu01
#define BOOST_ATOMIC_ADDRESS_LOCK_FREE BOOST_ATOMIC_POINTER_LOCK_FREE
143 2486 sjacqu01
144 2486 sjacqu01
#ifndef BOOST_ATOMIC_BOOL_LOCK_FREE
145 2486 sjacqu01
// We store bools in 1-byte storage in all backends
146 2486 sjacqu01
#define BOOST_ATOMIC_BOOL_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE
147 2486 sjacqu01
#endif
148 2486 sjacqu01
149 2486 sjacqu01
#ifndef BOOST_ATOMIC_FLAG_LOCK_FREE
150 2486 sjacqu01
#define BOOST_ATOMIC_FLAG_LOCK_FREE BOOST_ATOMIC_BOOL_LOCK_FREE
151 2486 sjacqu01
#endif
152 2486 sjacqu01
153 2486 sjacqu01
#ifndef BOOST_ATOMIC_THREAD_FENCE
154 2486 sjacqu01
#define BOOST_ATOMIC_THREAD_FENCE 0
155 2486 sjacqu01
#endif
156 2486 sjacqu01
157 2486 sjacqu01
#ifndef BOOST_ATOMIC_SIGNAL_FENCE
158 2486 sjacqu01
#define BOOST_ATOMIC_SIGNAL_FENCE 0
159 2486 sjacqu01
#endif
160 2486 sjacqu01
161 2486 sjacqu01
#endif // BOOST_ATOMIC_CAPABILITIES_HPP_INCLUDED_