@dittolive/ditto 4.5.0 → 4.5.1-experimental.aarch64-linux.1.aarch64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/README.md +2 -2
  2. package/node/ditto.cjs.js +2 -9620
  3. package/node/{ditto.linux-x64.node → ditto.linux-arm64.node} +0 -0
  4. package/package.json +38 -34
  5. package/types/ditto.d.ts +0 -2
  6. package/web/ditto.es6.js +1 -1
  7. package/web/ditto.umd.js +1 -1
  8. package/web/ditto.wasm +0 -0
  9. package/DittoReactNative.podspec +0 -27
  10. package/node/ditto.darwin-arm64.node +0 -0
  11. package/node/ditto.darwin-x64.node +0 -0
  12. package/node/ditto.linux-arm.node +0 -0
  13. package/node/ditto.win32-x64.node +0 -0
  14. package/node/transports.darwin-arm64.node +0 -0
  15. package/node/transports.darwin-x64.node +0 -0
  16. package/react-native/android/CMakeLists.txt +0 -37
  17. package/react-native/android/build.gradle +0 -203
  18. package/react-native/android/cpp-adapter.cpp +0 -254
  19. package/react-native/android/gradle.properties +0 -5
  20. package/react-native/android/src/main/AndroidManifest.xml +0 -4
  21. package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKModule.java +0 -85
  22. package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKPackage.java +0 -28
  23. package/react-native/boost/boost/assert.hpp +0 -85
  24. package/react-native/boost/boost/config/abi/borland_prefix.hpp +0 -27
  25. package/react-native/boost/boost/config/abi/borland_suffix.hpp +0 -12
  26. package/react-native/boost/boost/config/abi/msvc_prefix.hpp +0 -22
  27. package/react-native/boost/boost/config/abi/msvc_suffix.hpp +0 -8
  28. package/react-native/boost/boost/config/abi_prefix.hpp +0 -25
  29. package/react-native/boost/boost/config/abi_suffix.hpp +0 -25
  30. package/react-native/boost/boost/config/assert_cxx03.hpp +0 -211
  31. package/react-native/boost/boost/config/assert_cxx11.hpp +0 -209
  32. package/react-native/boost/boost/config/assert_cxx14.hpp +0 -47
  33. package/react-native/boost/boost/config/assert_cxx17.hpp +0 -62
  34. package/react-native/boost/boost/config/assert_cxx20.hpp +0 -59
  35. package/react-native/boost/boost/config/assert_cxx98.hpp +0 -23
  36. package/react-native/boost/boost/config/auto_link.hpp +0 -525
  37. package/react-native/boost/boost/config/compiler/borland.hpp +0 -339
  38. package/react-native/boost/boost/config/compiler/clang.hpp +0 -366
  39. package/react-native/boost/boost/config/compiler/clang_version.hpp +0 -83
  40. package/react-native/boost/boost/config/compiler/codegear.hpp +0 -385
  41. package/react-native/boost/boost/config/compiler/comeau.hpp +0 -59
  42. package/react-native/boost/boost/config/compiler/common_edg.hpp +0 -183
  43. package/react-native/boost/boost/config/compiler/compaq_cxx.hpp +0 -19
  44. package/react-native/boost/boost/config/compiler/cray.hpp +0 -446
  45. package/react-native/boost/boost/config/compiler/diab.hpp +0 -26
  46. package/react-native/boost/boost/config/compiler/digitalmars.hpp +0 -143
  47. package/react-native/boost/boost/config/compiler/gcc.hpp +0 -383
  48. package/react-native/boost/boost/config/compiler/gcc_xml.hpp +0 -114
  49. package/react-native/boost/boost/config/compiler/greenhills.hpp +0 -28
  50. package/react-native/boost/boost/config/compiler/hp_acc.hpp +0 -149
  51. package/react-native/boost/boost/config/compiler/intel.hpp +0 -577
  52. package/react-native/boost/boost/config/compiler/kai.hpp +0 -33
  53. package/react-native/boost/boost/config/compiler/metrowerks.hpp +0 -198
  54. package/react-native/boost/boost/config/compiler/mpw.hpp +0 -140
  55. package/react-native/boost/boost/config/compiler/nvcc.hpp +0 -61
  56. package/react-native/boost/boost/config/compiler/pathscale.hpp +0 -138
  57. package/react-native/boost/boost/config/compiler/pgi.hpp +0 -23
  58. package/react-native/boost/boost/config/compiler/sgi_mipspro.hpp +0 -29
  59. package/react-native/boost/boost/config/compiler/sunpro_cc.hpp +0 -222
  60. package/react-native/boost/boost/config/compiler/vacpp.hpp +0 -186
  61. package/react-native/boost/boost/config/compiler/visualc.hpp +0 -391
  62. package/react-native/boost/boost/config/compiler/xlcpp.hpp +0 -299
  63. package/react-native/boost/boost/config/compiler/xlcpp_zos.hpp +0 -173
  64. package/react-native/boost/boost/config/detail/cxx_composite.hpp +0 -203
  65. package/react-native/boost/boost/config/detail/posix_features.hpp +0 -95
  66. package/react-native/boost/boost/config/detail/select_compiler_config.hpp +0 -157
  67. package/react-native/boost/boost/config/detail/select_platform_config.hpp +0 -147
  68. package/react-native/boost/boost/config/detail/select_stdlib_config.hpp +0 -121
  69. package/react-native/boost/boost/config/detail/suffix.hpp +0 -1294
  70. package/react-native/boost/boost/config/header_deprecated.hpp +0 -26
  71. package/react-native/boost/boost/config/helper_macros.hpp +0 -37
  72. package/react-native/boost/boost/config/no_tr1/cmath.hpp +0 -28
  73. package/react-native/boost/boost/config/no_tr1/complex.hpp +0 -28
  74. package/react-native/boost/boost/config/no_tr1/functional.hpp +0 -28
  75. package/react-native/boost/boost/config/no_tr1/memory.hpp +0 -28
  76. package/react-native/boost/boost/config/no_tr1/utility.hpp +0 -28
  77. package/react-native/boost/boost/config/platform/aix.hpp +0 -33
  78. package/react-native/boost/boost/config/platform/amigaos.hpp +0 -15
  79. package/react-native/boost/boost/config/platform/beos.hpp +0 -26
  80. package/react-native/boost/boost/config/platform/bsd.hpp +0 -83
  81. package/react-native/boost/boost/config/platform/cloudabi.hpp +0 -18
  82. package/react-native/boost/boost/config/platform/cray.hpp +0 -18
  83. package/react-native/boost/boost/config/platform/cygwin.hpp +0 -71
  84. package/react-native/boost/boost/config/platform/haiku.hpp +0 -31
  85. package/react-native/boost/boost/config/platform/hpux.hpp +0 -87
  86. package/react-native/boost/boost/config/platform/irix.hpp +0 -31
  87. package/react-native/boost/boost/config/platform/linux.hpp +0 -106
  88. package/react-native/boost/boost/config/platform/macos.hpp +0 -87
  89. package/react-native/boost/boost/config/platform/qnxnto.hpp +0 -31
  90. package/react-native/boost/boost/config/platform/solaris.hpp +0 -31
  91. package/react-native/boost/boost/config/platform/symbian.hpp +0 -97
  92. package/react-native/boost/boost/config/platform/vms.hpp +0 -25
  93. package/react-native/boost/boost/config/platform/vxworks.hpp +0 -422
  94. package/react-native/boost/boost/config/platform/wasm.hpp +0 -23
  95. package/react-native/boost/boost/config/platform/win32.hpp +0 -90
  96. package/react-native/boost/boost/config/platform/zos.hpp +0 -32
  97. package/react-native/boost/boost/config/pragma_message.hpp +0 -31
  98. package/react-native/boost/boost/config/requires_threads.hpp +0 -92
  99. package/react-native/boost/boost/config/stdlib/dinkumware.hpp +0 -324
  100. package/react-native/boost/boost/config/stdlib/libcomo.hpp +0 -93
  101. package/react-native/boost/boost/config/stdlib/libcpp.hpp +0 -180
  102. package/react-native/boost/boost/config/stdlib/libstdcpp3.hpp +0 -482
  103. package/react-native/boost/boost/config/stdlib/modena.hpp +0 -79
  104. package/react-native/boost/boost/config/stdlib/msl.hpp +0 -98
  105. package/react-native/boost/boost/config/stdlib/roguewave.hpp +0 -208
  106. package/react-native/boost/boost/config/stdlib/sgi.hpp +0 -168
  107. package/react-native/boost/boost/config/stdlib/stlport.hpp +0 -258
  108. package/react-native/boost/boost/config/stdlib/vacpp.hpp +0 -74
  109. package/react-native/boost/boost/config/stdlib/xlcpp_zos.hpp +0 -61
  110. package/react-native/boost/boost/config/user.hpp +0 -133
  111. package/react-native/boost/boost/config/warning_disable.hpp +0 -47
  112. package/react-native/boost/boost/config/workaround.hpp +0 -305
  113. package/react-native/boost/boost/config.hpp +0 -67
  114. package/react-native/boost/boost/cstdint.hpp +0 -556
  115. package/react-native/boost/boost/intrusive_ptr.hpp +0 -18
  116. package/react-native/boost/boost/smart_ptr/detail/atomic_count.hpp +0 -103
  117. package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc.hpp +0 -79
  118. package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp +0 -63
  119. package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp +0 -88
  120. package/react-native/boost/boost/smart_ptr/detail/atomic_count_nt.hpp +0 -66
  121. package/react-native/boost/boost/smart_ptr/detail/atomic_count_pt.hpp +0 -104
  122. package/react-native/boost/boost/smart_ptr/detail/atomic_count_spin.hpp +0 -69
  123. package/react-native/boost/boost/smart_ptr/detail/atomic_count_std_atomic.hpp +0 -67
  124. package/react-native/boost/boost/smart_ptr/detail/atomic_count_sync.hpp +0 -72
  125. package/react-native/boost/boost/smart_ptr/detail/atomic_count_win32.hpp +0 -70
  126. package/react-native/boost/boost/smart_ptr/detail/local_counted_base.hpp +0 -148
  127. package/react-native/boost/boost/smart_ptr/detail/local_sp_deleter.hpp +0 -91
  128. package/react-native/boost/boost/smart_ptr/detail/operator_bool.hpp +0 -64
  129. package/react-native/boost/boost/smart_ptr/detail/requires_cxx11.hpp +0 -23
  130. package/react-native/boost/boost/smart_ptr/detail/shared_count.hpp +0 -707
  131. package/react-native/boost/boost/smart_ptr/detail/sp_convertible.hpp +0 -92
  132. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base.hpp +0 -92
  133. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +0 -163
  134. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_aix.hpp +0 -152
  135. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +0 -185
  136. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +0 -148
  137. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +0 -170
  138. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +0 -200
  139. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +0 -194
  140. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +0 -179
  141. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +0 -186
  142. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_nt.hpp +0 -119
  143. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp +0 -147
  144. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +0 -174
  145. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_spin.hpp +0 -141
  146. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +0 -147
  147. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_sync.hpp +0 -165
  148. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +0 -163
  149. package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_w32.hpp +0 -140
  150. package/react-native/boost/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -309
  151. package/react-native/boost/boost/smart_ptr/detail/sp_disable_deprecated.hpp +0 -40
  152. package/react-native/boost/boost/smart_ptr/detail/sp_forward.hpp +0 -52
  153. package/react-native/boost/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +0 -27
  154. package/react-native/boost/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp +0 -69
  155. package/react-native/boost/boost/smart_ptr/detail/sp_interlocked.hpp +0 -173
  156. package/react-native/boost/boost/smart_ptr/detail/sp_noexcept.hpp +0 -48
  157. package/react-native/boost/boost/smart_ptr/detail/sp_nullptr_t.hpp +0 -45
  158. package/react-native/boost/boost/smart_ptr/detail/sp_obsolete.hpp +0 -32
  159. package/react-native/boost/boost/smart_ptr/detail/sp_thread_pause.hpp +0 -51
  160. package/react-native/boost/boost/smart_ptr/detail/sp_thread_sleep.hpp +0 -104
  161. package/react-native/boost/boost/smart_ptr/detail/sp_thread_yield.hpp +0 -100
  162. package/react-native/boost/boost/smart_ptr/detail/sp_typeinfo_.hpp +0 -58
  163. package/react-native/boost/boost/smart_ptr/detail/sp_win32_sleep.hpp +0 -49
  164. package/react-native/boost/boost/smart_ptr/intrusive_ptr.hpp +0 -409
  165. package/react-native/boost/boost/smart_ptr/intrusive_ref_counter.hpp +0 -188
  166. package/react-native/cpp/include/Attachment.h +0 -16
  167. package/react-native/cpp/include/Authentication.h +0 -23
  168. package/react-native/cpp/include/Collection.h +0 -13
  169. package/react-native/cpp/include/DQL.h +0 -21
  170. package/react-native/cpp/include/Document.h +0 -17
  171. package/react-native/cpp/include/Identity.h +0 -17
  172. package/react-native/cpp/include/Lifecycle.h +0 -16
  173. package/react-native/cpp/include/LiveQuery.h +0 -17
  174. package/react-native/cpp/include/Logger.h +0 -22
  175. package/react-native/cpp/include/Misc.h +0 -26
  176. package/react-native/cpp/include/Presence.h +0 -14
  177. package/react-native/cpp/include/RetainableState.h +0 -24
  178. package/react-native/cpp/include/SmallPeerInfo.h +0 -17
  179. package/react-native/cpp/include/Transports.h +0 -25
  180. package/react-native/cpp/include/TypedArray.hpp +0 -167
  181. package/react-native/cpp/include/Utils.h +0 -61
  182. package/react-native/cpp/include/main.h +0 -10
  183. package/react-native/cpp/src/Attachment.cpp +0 -86
  184. package/react-native/cpp/src/Authentication.cpp +0 -224
  185. package/react-native/cpp/src/Collection.cpp +0 -54
  186. package/react-native/cpp/src/DQL.cpp +0 -254
  187. package/react-native/cpp/src/Document.cpp +0 -146
  188. package/react-native/cpp/src/Identity.cpp +0 -123
  189. package/react-native/cpp/src/Lifecycle.cpp +0 -75
  190. package/react-native/cpp/src/LiveQuery.cpp +0 -64
  191. package/react-native/cpp/src/Logger.cpp +0 -200
  192. package/react-native/cpp/src/Misc.cpp +0 -271
  193. package/react-native/cpp/src/Presence.cpp +0 -77
  194. package/react-native/cpp/src/RetainableState.cpp +0 -15
  195. package/react-native/cpp/src/SmallPeerInfo.cpp +0 -108
  196. package/react-native/cpp/src/Transports.cpp +0 -270
  197. package/react-native/cpp/src/TypedArray.cpp +0 -303
  198. package/react-native/cpp/src/Utils.cpp +0 -138
  199. package/react-native/cpp/src/main.cpp +0 -149
  200. package/react-native/dittoffi/dittoffi.h +0 -4698
  201. package/react-native/dittoffi/ifaddrs.cpp +0 -385
  202. package/react-native/dittoffi/ifaddrs.h +0 -206
  203. package/react-native/ios/DittoRNSDK.h +0 -7
  204. package/react-native/ios/DittoRNSDK.mm +0 -107
  205. package/react-native/ios/YeetJSIUtils.h +0 -60
  206. package/react-native/ios/YeetJSIUtils.mm +0 -196
  207. package/react-native/lib/commonjs/ditto.rn.js +0 -93
  208. package/react-native/lib/commonjs/ditto.rn.js.map +0 -1
  209. package/react-native/lib/commonjs/index.js +0 -14
  210. package/react-native/lib/commonjs/index.js.map +0 -1
  211. package/react-native/lib/module/ditto.rn.js +0 -83
  212. package/react-native/lib/module/ditto.rn.js.map +0 -1
  213. package/react-native/lib/module/index.js +0 -13
  214. package/react-native/lib/module/index.js.map +0 -1
  215. package/react-native/lib/typescript/ditto.rn.d.ts +0 -15
  216. package/react-native/lib/typescript/ditto.rn.d.ts.map +0 -1
  217. package/react-native/lib/typescript/index.d.ts +0 -1
  218. package/react-native/lib/typescript/index.d.ts.map +0 -1
  219. package/react-native/scripts/ruby/include_local_boost.rb +0 -78
  220. package/react-native/src/ditto.rn.ts +0 -91
  221. package/react-native/src/environment/environment.fallback.ts +0 -4
  222. package/react-native/src/index.ts +0 -26
  223. package/react-native/src/sources/@cbor-redux.ts +0 -2
  224. package/react-native/src/sources/@ditto.core.ts +0 -1
  225. package/react-native/src/sources/@environment.ts +0 -2
  226. package/react-native/src/sources/attachment-fetch-event.ts +0 -54
  227. package/react-native/src/sources/attachment-fetcher-manager.ts +0 -129
  228. package/react-native/src/sources/attachment-fetcher.ts +0 -124
  229. package/react-native/src/sources/attachment-token.ts +0 -48
  230. package/react-native/src/sources/attachment.ts +0 -59
  231. package/react-native/src/sources/augment.ts +0 -89
  232. package/react-native/src/sources/authenticator.ts +0 -314
  233. package/react-native/src/sources/base-pending-cursor-operation.ts +0 -237
  234. package/react-native/src/sources/base-pending-id-specific-operation.ts +0 -109
  235. package/react-native/src/sources/bridge.ts +0 -549
  236. package/react-native/src/sources/build-time-constants.ts +0 -4
  237. package/react-native/src/sources/cbor.ts +0 -35
  238. package/react-native/src/sources/collection-interface.ts +0 -67
  239. package/react-native/src/sources/collection.ts +0 -212
  240. package/react-native/src/sources/collections-event.ts +0 -99
  241. package/react-native/src/sources/counter.ts +0 -77
  242. package/react-native/src/sources/ditto.ts +0 -945
  243. package/react-native/src/sources/document-id.ts +0 -159
  244. package/react-native/src/sources/document-path.ts +0 -303
  245. package/react-native/src/sources/document.ts +0 -192
  246. package/react-native/src/sources/epilogue.ts +0 -24
  247. package/react-native/src/sources/error-codes.ts +0 -52
  248. package/react-native/src/sources/error.ts +0 -203
  249. package/react-native/src/sources/essentials.ts +0 -53
  250. package/react-native/src/sources/ffi-error.ts +0 -117
  251. package/react-native/src/sources/ffi.ts +0 -1972
  252. package/react-native/src/sources/identity.ts +0 -163
  253. package/react-native/src/sources/init.ts +0 -70
  254. package/react-native/src/sources/internal.ts +0 -113
  255. package/react-native/src/sources/keep-alive.ts +0 -69
  256. package/react-native/src/sources/key-path.ts +0 -195
  257. package/react-native/src/sources/live-query-event.ts +0 -208
  258. package/react-native/src/sources/live-query-manager.ts +0 -101
  259. package/react-native/src/sources/live-query.ts +0 -164
  260. package/react-native/src/sources/logger.ts +0 -196
  261. package/react-native/src/sources/observer-manager.ts +0 -175
  262. package/react-native/src/sources/observer.ts +0 -77
  263. package/react-native/src/sources/pending-collections-operation.ts +0 -232
  264. package/react-native/src/sources/pending-cursor-operation.ts +0 -218
  265. package/react-native/src/sources/pending-id-specific-operation.ts +0 -216
  266. package/react-native/src/sources/presence-manager.ts +0 -160
  267. package/react-native/src/sources/presence.ts +0 -238
  268. package/react-native/src/sources/query-result-item.ts +0 -116
  269. package/react-native/src/sources/query-result.ts +0 -55
  270. package/react-native/src/sources/register.ts +0 -92
  271. package/react-native/src/sources/small-peer-info.ts +0 -176
  272. package/react-native/src/sources/static-tcp-client.ts +0 -6
  273. package/react-native/src/sources/store-observer.ts +0 -176
  274. package/react-native/src/sources/store.ts +0 -365
  275. package/react-native/src/sources/subscription-manager.ts +0 -98
  276. package/react-native/src/sources/subscription.ts +0 -88
  277. package/react-native/src/sources/sync-subscription.ts +0 -90
  278. package/react-native/src/sources/sync.ts +0 -495
  279. package/react-native/src/sources/test-helpers.ts +0 -24
  280. package/react-native/src/sources/transport-conditions-manager.ts +0 -104
  281. package/react-native/src/sources/transport-config.ts +0 -428
  282. package/react-native/src/sources/update-result.ts +0 -66
  283. package/react-native/src/sources/update-results-map.ts +0 -57
  284. package/react-native/src/sources/websocket-client.ts +0 -6
  285. package/react-native/src/sources/write-transaction-collection.ts +0 -122
  286. package/react-native/src/sources/write-transaction-pending-cursor-operation.ts +0 -101
  287. package/react-native/src/sources/write-transaction-pending-id-specific-operation.ts +0 -72
  288. package/react-native/src/sources/write-transaction.ts +0 -119
  289. package/react-native.config.js +0 -9
@@ -1,27 +0,0 @@
1
- #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_GCC_INTRINSICS_HPP_INCLUDED
2
- #define BOOST_SMART_PTR_DETAIL_SP_HAS_GCC_INTRINSICS_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/smart_ptr/detail/sp_has_gcc_intrinsics.hpp
12
- //
13
- // Copyright 2020 Peter Dimov
14
- // Distributed under the Boost Software License, Version 1.0.
15
- // https://www.boost.org/LICENSE_1_0.txt
16
- //
17
- // Defines the BOOST_SP_HAS_GCC_INTRINSICS macro if the __atomic_*
18
- // intrinsics are available.
19
-
20
-
21
- #if defined( __ATOMIC_RELAXED ) && defined( __ATOMIC_ACQUIRE ) && defined( __ATOMIC_RELEASE ) && defined( __ATOMIC_ACQ_REL )
22
-
23
- # define BOOST_SP_HAS_GCC_INTRINSICS
24
-
25
- #endif
26
-
27
- #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_GCC_INTRINSICS_HPP_INCLUDED
@@ -1,69 +0,0 @@
1
- #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_INTRINSICS_HPP_INCLUDED
2
- #define BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_INTRINSICS_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/smart_ptr/detail/sp_has_sync_intrinsics.hpp
12
- //
13
- // Copyright (c) 2008, 2009 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
- // Defines the BOOST_SP_HAS_SYNC_INTRINSICS macro if the __sync_* intrinsics
20
- // are available.
21
- //
22
-
23
- #if !defined( BOOST_SP_NO_SYNC_INTRINSICS ) && !defined( BOOST_SP_NO_SYNC )
24
-
25
- #if defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ) && !defined( __c2__ )
26
-
27
- # define BOOST_SP_HAS_SYNC_INTRINSICS
28
-
29
- #elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 ) && !defined( __COMPILER_VER__ )
30
-
31
- # define BOOST_SP_HAS_SYNC_INTRINSICS
32
-
33
- #elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) && !defined( __c2__ )
34
-
35
- #define BOOST_SP_HAS_SYNC_INTRINSICS
36
-
37
- #if defined( __arm__ ) || defined( __armel__ )
38
- #undef BOOST_SP_HAS_SYNC_INTRINSICS
39
- #endif
40
-
41
- #if defined( __hppa ) || defined( __hppa__ )
42
- #undef BOOST_SP_HAS_SYNC_INTRINSICS
43
- #endif
44
-
45
- #if defined( __m68k__ )
46
- #undef BOOST_SP_HAS_SYNC_INTRINSICS
47
- #endif
48
-
49
- #if defined( __sh__ )
50
- #undef BOOST_SP_HAS_SYNC_INTRINSICS
51
- #endif
52
-
53
- #if defined( __sparc__ )
54
- #undef BOOST_SP_HAS_SYNC_INTRINSICS
55
- #endif
56
-
57
- #if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1110 )
58
- #undef BOOST_SP_HAS_SYNC_INTRINSICS
59
- #endif
60
-
61
- #if defined(__PATHSCALE__) && ((__PATHCC__ == 4) && (__PATHCC_MINOR__ < 9))
62
- #undef BOOST_SP_HAS_SYNC_INTRINSICS
63
- #endif
64
-
65
- #endif
66
-
67
- #endif // #if !defined( BOOST_SP_NO_SYNC_INTRINSICS ) && !defined( BOOST_SP_NO_SYNC )
68
-
69
- #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_INTRINSICS_HPP_INCLUDED
@@ -1,173 +0,0 @@
1
- #ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
2
- #define BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_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/sp_interlocked.hpp
12
- //
13
- // Copyright 2005, 2014 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
-
20
- #include <boost/config.hpp>
21
-
22
- // BOOST_SP_HAS_INTRIN_H
23
-
24
- // VC9 has intrin.h, but it collides with <utility>
25
- #if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
26
-
27
- # define BOOST_SP_HAS_INTRIN_H
28
-
29
- // Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
30
- #elif defined( __MINGW64_VERSION_MAJOR )
31
-
32
- // MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
33
- # define BOOST_SP_HAS_INTRIN_H
34
-
35
- #elif defined( __LP64__ )
36
-
37
- // We have to use intrin.h on Cygwin 64
38
- # define BOOST_SP_HAS_INTRIN_H
39
-
40
- // Intel C++ on Windows on VC10+ stdlib
41
- #elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
42
-
43
- # define BOOST_SP_HAS_INTRIN_H
44
-
45
- // clang-cl on Windows on VC10+ stdlib
46
- #elif defined( __clang__ ) && defined( _MSC_VER ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
47
-
48
- # define BOOST_SP_HAS_INTRIN_H
49
-
50
- #endif
51
-
52
- #if defined( BOOST_USE_WINDOWS_H )
53
-
54
- # include <windows.h>
55
-
56
- # define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement
57
- # define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement
58
- # define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
59
- # define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange
60
- # define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
61
-
62
- #elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_SP_HAS_INTRIN_H )
63
-
64
- #include <intrin.h>
65
-
66
- # define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
67
- # define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
68
- # define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
69
- # define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
70
- # define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
71
-
72
- #elif defined( _WIN32_WCE )
73
-
74
- #if _WIN32_WCE >= 0x600
75
-
76
- extern "C" long __cdecl _InterlockedIncrement( long volatile * );
77
- extern "C" long __cdecl _InterlockedDecrement( long volatile * );
78
- extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
79
- extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
80
- extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
81
-
82
- # define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
83
- # define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
84
- # define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
85
- # define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
86
- # define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
87
-
88
- #else
89
-
90
- // under Windows CE we still have old-style Interlocked* functions
91
-
92
- extern "C" long __cdecl InterlockedIncrement( long* );
93
- extern "C" long __cdecl InterlockedDecrement( long* );
94
- extern "C" long __cdecl InterlockedCompareExchange( long*, long, long );
95
- extern "C" long __cdecl InterlockedExchange( long*, long );
96
- extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
97
-
98
- # define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement
99
- # define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement
100
- # define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
101
- # define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange
102
- # define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
103
-
104
- #endif
105
-
106
- #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
107
-
108
- #if defined( __CLRCALL_PURE_OR_CDECL )
109
-
110
- extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
111
- extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );
112
- extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );
113
- extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );
114
- extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );
115
-
116
- #else
117
-
118
- extern "C" long __cdecl _InterlockedIncrement( long volatile * );
119
- extern "C" long __cdecl _InterlockedDecrement( long volatile * );
120
- extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
121
- extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
122
- extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
123
-
124
- # if defined( BOOST_MSVC ) && BOOST_MSVC == 1310
125
- //From MSDN, Visual Studio .NET 2003 spedific: To declare one of the interlocked functions
126
- //for use as an intrinsic, the function must be declared with the leading underscore and
127
- //the new function must appear in a #pragma intrinsic statement.
128
- # pragma intrinsic( _InterlockedIncrement )
129
- # pragma intrinsic( _InterlockedDecrement )
130
- # pragma intrinsic( _InterlockedCompareExchange )
131
- # pragma intrinsic( _InterlockedExchange )
132
- # pragma intrinsic( _InterlockedExchangeAdd )
133
- # endif
134
-
135
- #endif
136
-
137
- # define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
138
- # define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
139
- # define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
140
- # define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
141
- # define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
142
-
143
- #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
144
-
145
- namespace boost
146
- {
147
-
148
- namespace detail
149
- {
150
-
151
- extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * );
152
- extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * );
153
- extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long );
154
- extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long );
155
- extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long );
156
-
157
- } // namespace detail
158
-
159
- } // namespace boost
160
-
161
- # define BOOST_SP_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement
162
- # define BOOST_SP_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement
163
- # define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange
164
- # define BOOST_SP_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
165
- # define BOOST_SP_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
166
-
167
- #else
168
-
169
- # error "Interlocked intrinsics not available"
170
-
171
- #endif
172
-
173
- #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
@@ -1,48 +0,0 @@
1
- #ifndef BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_HPP_INCLUDED
2
- #define BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_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
- // detail/sp_noexcept.hpp
11
- //
12
- // Copyright 2016, 2017 Peter Dimov
13
- //
14
- // Distributed under the Boost Software License, Version 1.0.
15
- // See accompanying file LICENSE_1_0.txt or copy at
16
- // http://www.boost.org/LICENSE_1_0.txt
17
-
18
- #include <boost/config.hpp>
19
-
20
- // BOOST_SP_NOEXCEPT
21
-
22
- #if defined( BOOST_MSVC ) && BOOST_MSVC >= 1700 && BOOST_MSVC < 1900
23
-
24
- # define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT_OR_NOTHROW
25
-
26
- #else
27
-
28
- # define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT
29
-
30
- #endif
31
-
32
- // BOOST_SP_NOEXCEPT_WITH_ASSERT
33
-
34
- #if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) )
35
-
36
- # define BOOST_SP_NOEXCEPT_WITH_ASSERT BOOST_SP_NOEXCEPT
37
-
38
- #elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) )
39
-
40
- # define BOOST_SP_NOEXCEPT_WITH_ASSERT
41
-
42
- #else
43
-
44
- # define BOOST_SP_NOEXCEPT_WITH_ASSERT BOOST_SP_NOEXCEPT
45
-
46
- #endif
47
-
48
- #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_HPP_INCLUDED
@@ -1,45 +0,0 @@
1
- #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED
2
- #define BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_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
- // detail/sp_nullptr_t.hpp
11
- //
12
- // Copyright 2013 Peter Dimov
13
- //
14
- // Distributed under the Boost Software License, Version 1.0.
15
- // See accompanying file LICENSE_1_0.txt or copy at
16
- // http://www.boost.org/LICENSE_1_0.txt
17
-
18
- #include <boost/config.hpp>
19
- #include <cstddef>
20
-
21
- #if !defined( BOOST_NO_CXX11_NULLPTR )
22
-
23
- namespace boost
24
- {
25
-
26
- namespace detail
27
- {
28
-
29
- #if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) )
30
-
31
- typedef decltype(nullptr) sp_nullptr_t;
32
-
33
- #else
34
-
35
- typedef std::nullptr_t sp_nullptr_t;
36
-
37
- #endif
38
-
39
- } // namespace detail
40
-
41
- } // namespace boost
42
-
43
- #endif // !defined( BOOST_NO_CXX11_NULLPTR )
44
-
45
- #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED
@@ -1,32 +0,0 @@
1
- #ifndef BOOST_SMART_PTR_DETAIL_SP_OBSOLETE_HPP_INCLUDED
2
- #define BOOST_SMART_PTR_DETAIL_SP_OBSOLETE_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/smart_ptr/detail/sp_obsolete.hpp
12
- //
13
- // Copyright 2020 Peter Dimov
14
- // Distributed under the Boost Software License, Version 1.0.
15
- // https://www.boost.org/LICENSE_1_0.txt
16
- //
17
- // Defines the BOOST_SP_OBSOLETE macro that emits a deprecation
18
- // message.
19
-
20
- #include <boost/config/pragma_message.hpp>
21
-
22
- #if !defined( BOOST_SP_NO_OBSOLETE_MESSAGE )
23
-
24
- #define BOOST_SP_OBSOLETE() BOOST_PRAGMA_MESSAGE("This platform-specific implementation is presumed obsolete and is slated for removal. If you want it retained, please open an issue in https://github.com/boostorg/smart_ptr.")
25
-
26
- #else
27
-
28
- #define BOOST_SP_OBSOLETE()
29
-
30
- #endif
31
-
32
- #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_OBSOLETE_HPP_INCLUDED
@@ -1,51 +0,0 @@
1
- #ifndef BOOST_SMART_PTR_DETAIL_SP_THREAD_PAUSE_HPP_INCLUDED
2
- #define BOOST_SMART_PTR_DETAIL_SP_THREAD_PAUSE_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
- // boost/smart_ptr/detail/sp_thread_pause.hpp
11
- //
12
- // inline void bost::detail::sp_thread_pause();
13
- //
14
- // Emits a "pause" instruction.
15
- //
16
- // Copyright 2008, 2020 Peter Dimov
17
- // Distributed under the Boost Software License, Version 1.0
18
- // https://www.boost.org/LICENSE_1_0.txt
19
-
20
- #if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) && !defined(__c2__)
21
-
22
- extern "C" void _mm_pause();
23
-
24
- #define BOOST_SP_PAUSE _mm_pause();
25
-
26
- #elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) )
27
-
28
- #define BOOST_SP_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" );
29
-
30
- #else
31
-
32
- #define BOOST_SP_PAUSE
33
-
34
- #endif
35
-
36
- namespace boost
37
- {
38
- namespace detail
39
- {
40
-
41
- inline void sp_thread_pause()
42
- {
43
- BOOST_SP_PAUSE
44
- }
45
-
46
- } // namespace detail
47
- } // namespace boost
48
-
49
- #undef BOOST_SP_PAUSE
50
-
51
- #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_THREAD_PAUSE_HPP_INCLUDED
@@ -1,104 +0,0 @@
1
- #ifndef BOOST_SMART_PTR_DETAIL_SP_THREAD_SLEEP_HPP_INCLUDED
2
- #define BOOST_SMART_PTR_DETAIL_SP_THREAD_SLEEP_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
- // boost/smart_ptr/detail/sp_thread_sleep.hpp
11
- //
12
- // inline void bost::detail::sp_thread_sleep();
13
- //
14
- // Cease execution for a while to yield to other threads,
15
- // as if by calling nanosleep() with an appropriate interval.
16
- //
17
- // Copyright 2008, 2020 Peter Dimov
18
- // Distributed under the Boost Software License, Version 1.0
19
- // https://www.boost.org/LICENSE_1_0.txt
20
-
21
- #include <boost/config.hpp>
22
- #include <boost/config/pragma_message.hpp>
23
-
24
- #if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
25
-
26
- #if defined(BOOST_SP_REPORT_IMPLEMENTATION)
27
- BOOST_PRAGMA_MESSAGE("Using Sleep(1) in sp_thread_sleep")
28
- #endif
29
-
30
- #include <boost/smart_ptr/detail/sp_win32_sleep.hpp>
31
-
32
- namespace boost
33
- {
34
-
35
- namespace detail
36
- {
37
-
38
- inline void sp_thread_sleep()
39
- {
40
- Sleep( 1 );
41
- }
42
-
43
- } // namespace detail
44
-
45
- } // namespace boost
46
-
47
- #elif defined(BOOST_HAS_NANOSLEEP)
48
-
49
- #if defined(BOOST_SP_REPORT_IMPLEMENTATION)
50
- BOOST_PRAGMA_MESSAGE("Using nanosleep() in sp_thread_sleep")
51
- #endif
52
-
53
- #include <time.h>
54
-
55
- namespace boost
56
- {
57
-
58
- namespace detail
59
- {
60
-
61
- inline void sp_thread_sleep()
62
- {
63
- // g++ -Wextra warns on {} or {0}
64
- struct timespec rqtp = { 0, 0 };
65
-
66
- // POSIX says that timespec has tv_sec and tv_nsec
67
- // But it doesn't guarantee order or placement
68
-
69
- rqtp.tv_sec = 0;
70
- rqtp.tv_nsec = 1000;
71
-
72
- nanosleep( &rqtp, 0 );
73
- }
74
-
75
- } // namespace detail
76
-
77
- } // namespace boost
78
-
79
- #else
80
-
81
- #if defined(BOOST_SP_REPORT_IMPLEMENTATION)
82
- BOOST_PRAGMA_MESSAGE("Using sp_thread_yield() in sp_thread_sleep")
83
- #endif
84
-
85
- #include <boost/smart_ptr/detail/sp_thread_yield.hpp>
86
-
87
- namespace boost
88
- {
89
-
90
- namespace detail
91
- {
92
-
93
- inline void sp_thread_sleep()
94
- {
95
- sp_thread_yield();
96
- }
97
-
98
- } // namespace detail
99
-
100
- } // namespace boost
101
-
102
- #endif
103
-
104
- #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_THREAD_SLEEP_HPP_INCLUDED
@@ -1,100 +0,0 @@
1
- #ifndef BOOST_SMART_PTR_DETAIL_SP_THREAD_YIELD_HPP_INCLUDED
2
- #define BOOST_SMART_PTR_DETAIL_SP_THREAD_YIELD_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
- // boost/smart_ptr/detail/sp_thread_yield.hpp
11
- //
12
- // inline void bost::detail::sp_thread_yield();
13
- //
14
- // Gives up the remainder of the time slice,
15
- // as if by calling sched_yield().
16
- //
17
- // Copyright 2008, 2020 Peter Dimov
18
- // Distributed under the Boost Software License, Version 1.0
19
- // https://www.boost.org/LICENSE_1_0.txt
20
-
21
- #include <boost/config.hpp>
22
- #include <boost/config/pragma_message.hpp>
23
-
24
- #if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
25
-
26
- #if defined(BOOST_SP_REPORT_IMPLEMENTATION)
27
- BOOST_PRAGMA_MESSAGE("Using Sleep(0) in sp_thread_yield")
28
- #endif
29
-
30
- #include <boost/smart_ptr/detail/sp_win32_sleep.hpp>
31
-
32
- namespace boost
33
- {
34
-
35
- namespace detail
36
- {
37
-
38
- inline void sp_thread_yield()
39
- {
40
- Sleep( 0 );
41
- }
42
-
43
- } // namespace detail
44
-
45
- } // namespace boost
46
-
47
- #elif defined(BOOST_HAS_SCHED_YIELD)
48
-
49
- #if defined(BOOST_SP_REPORT_IMPLEMENTATION)
50
- BOOST_PRAGMA_MESSAGE("Using sched_yield() in sp_thread_yield")
51
- #endif
52
-
53
- #ifndef _AIX
54
- # include <sched.h>
55
- #else
56
- // AIX's sched.h defines ::var which sometimes conflicts with Lambda's var
57
- extern "C" int sched_yield(void);
58
- #endif
59
-
60
- namespace boost
61
- {
62
-
63
- namespace detail
64
- {
65
-
66
- inline void sp_thread_yield()
67
- {
68
- sched_yield();
69
- }
70
-
71
- } // namespace detail
72
-
73
- } // namespace boost
74
-
75
- #else
76
-
77
- #if defined(BOOST_SP_REPORT_IMPLEMENTATION)
78
- BOOST_PRAGMA_MESSAGE("Using sp_thread_pause() in sp_thread_yield")
79
- #endif
80
-
81
- #include <boost/smart_ptr/detail/sp_thread_pause.hpp>
82
-
83
- namespace boost
84
- {
85
-
86
- namespace detail
87
- {
88
-
89
- inline void sp_thread_yield()
90
- {
91
- sp_thread_pause();
92
- }
93
-
94
- } // namespace detail
95
-
96
- } // namespace boost
97
-
98
- #endif
99
-
100
- #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_THREAD_YIELD_HPP_INCLUDED