wait_capabilities.hpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. /*
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * Copyright (c) 2020 Andrey Semashev
  7. */
  8. /*!
  9. * \file atomic/detail/wait_capabilities.hpp
  10. *
  11. * This header defines waiting/notifying operations capabilities macros.
  12. */
  13. #ifndef BOOST_ATOMIC_DETAIL_WAIT_CAPABILITIES_HPP_INCLUDED_
  14. #define BOOST_ATOMIC_DETAIL_WAIT_CAPABILITIES_HPP_INCLUDED_
  15. #include <boost/atomic/detail/config.hpp>
  16. #include <boost/atomic/detail/platform.hpp>
  17. #include <boost/atomic/detail/int_sizes.hpp>
  18. #if !defined(BOOST_ATOMIC_NO_FLOATING_POINT)
  19. #include <boost/atomic/detail/float_sizes.hpp>
  20. #endif
  21. #if !defined(BOOST_ATOMIC_EMULATED) && !defined(BOOST_ATOMIC_DETAIL_WAIT_BACKEND_GENERIC)
  22. #include BOOST_ATOMIC_DETAIL_WAIT_BACKEND_HEADER(boost/atomic/detail/wait_caps_)
  23. #endif
  24. #ifdef BOOST_HAS_PRAGMA_ONCE
  25. #pragma once
  26. #endif
  27. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY
  28. #define BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY 0
  29. #endif
  30. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY
  31. #define BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY 0
  32. #endif
  33. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  34. #define BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY 0
  35. #endif
  36. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  37. #define BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY 0
  38. #endif
  39. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  40. #define BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY 0
  41. #endif
  42. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  43. #define BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY 0
  44. #endif
  45. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  46. #define BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY 0
  47. #endif
  48. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  49. #define BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY 0
  50. #endif
  51. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT128_WAIT_NOTIFY
  52. #define BOOST_ATOMIC_HAS_NATIVE_INT128_WAIT_NOTIFY 0
  53. #endif
  54. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT128_IPC_WAIT_NOTIFY
  55. #define BOOST_ATOMIC_HAS_NATIVE_INT128_IPC_WAIT_NOTIFY 0
  56. #endif
  57. #ifndef BOOST_ATOMIC_HAS_NATIVE_CHAR_WAIT_NOTIFY
  58. #define BOOST_ATOMIC_HAS_NATIVE_CHAR_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY
  59. #endif
  60. #ifndef BOOST_ATOMIC_HAS_NATIVE_CHAR_IPC_WAIT_NOTIFY
  61. #define BOOST_ATOMIC_HAS_NATIVE_CHAR_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY
  62. #endif
  63. #ifndef BOOST_ATOMIC_HAS_NATIVE_CHAR8_T_WAIT_NOTIFY
  64. #define BOOST_ATOMIC_HAS_NATIVE_CHAR8_T_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY
  65. #endif
  66. #ifndef BOOST_ATOMIC_HAS_NATIVE_CHAR8_T_IPC_WAIT_NOTIFY
  67. #define BOOST_ATOMIC_HAS_NATIVE_CHAR8_T_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY
  68. #endif
  69. #ifndef BOOST_ATOMIC_HAS_NATIVE_CHAR16_T_WAIT_NOTIFY
  70. #define BOOST_ATOMIC_HAS_NATIVE_CHAR16_T_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  71. #endif
  72. #ifndef BOOST_ATOMIC_HAS_NATIVE_CHAR16_T_IPC_WAIT_NOTIFY
  73. #define BOOST_ATOMIC_HAS_NATIVE_CHAR16_T_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  74. #endif
  75. #ifndef BOOST_ATOMIC_HAS_NATIVE_CHAR32_T_WAIT_NOTIFY
  76. #define BOOST_ATOMIC_HAS_NATIVE_CHAR32_T_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  77. #endif
  78. #ifndef BOOST_ATOMIC_HAS_NATIVE_CHAR32_T_IPC_WAIT_NOTIFY
  79. #define BOOST_ATOMIC_HAS_NATIVE_CHAR32_T_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  80. #endif
  81. #ifndef BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_WAIT_NOTIFY
  82. #if BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1
  83. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY
  84. #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2
  85. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  86. #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4
  87. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  88. #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8
  89. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  90. #else
  91. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_WAIT_NOTIFY 0
  92. #endif
  93. #endif
  94. #ifndef BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_IPC_WAIT_NOTIFY
  95. #if BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1
  96. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY
  97. #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2
  98. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  99. #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4
  100. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  101. #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8
  102. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  103. #else
  104. #define BOOST_ATOMIC_HAS_NATIVE_WCHAR_T_IPC_WAIT_NOTIFY 0
  105. #endif
  106. #endif
  107. #ifndef BOOST_ATOMIC_HAS_NATIVE_SHORT_WAIT_NOTIFY
  108. #if BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 1
  109. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY
  110. #elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 2
  111. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  112. #elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 4
  113. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  114. #elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 8
  115. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  116. #else
  117. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_WAIT_NOTIFY 0
  118. #endif
  119. #endif
  120. #ifndef BOOST_ATOMIC_HAS_NATIVE_SHORT_IPC_WAIT_NOTIFY
  121. #if BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 1
  122. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY
  123. #elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 2
  124. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  125. #elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 4
  126. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  127. #elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 8
  128. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  129. #else
  130. #define BOOST_ATOMIC_HAS_NATIVE_SHORT_IPC_WAIT_NOTIFY 0
  131. #endif
  132. #endif
  133. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT_WAIT_NOTIFY
  134. #if BOOST_ATOMIC_DETAIL_SIZEOF_INT == 1
  135. #define BOOST_ATOMIC_HAS_NATIVE_INT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY
  136. #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 2
  137. #define BOOST_ATOMIC_HAS_NATIVE_INT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  138. #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 4
  139. #define BOOST_ATOMIC_HAS_NATIVE_INT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  140. #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 8
  141. #define BOOST_ATOMIC_HAS_NATIVE_INT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  142. #else
  143. #define BOOST_ATOMIC_HAS_NATIVE_INT_WAIT_NOTIFY 0
  144. #endif
  145. #endif
  146. #ifndef BOOST_ATOMIC_HAS_NATIVE_INT_IPC_WAIT_NOTIFY
  147. #if BOOST_ATOMIC_DETAIL_SIZEOF_INT == 1
  148. #define BOOST_ATOMIC_HAS_NATIVE_INT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY
  149. #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 2
  150. #define BOOST_ATOMIC_HAS_NATIVE_INT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  151. #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 4
  152. #define BOOST_ATOMIC_HAS_NATIVE_INT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  153. #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 8
  154. #define BOOST_ATOMIC_HAS_NATIVE_INT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  155. #else
  156. #define BOOST_ATOMIC_HAS_NATIVE_INT_IPC_WAIT_NOTIFY 0
  157. #endif
  158. #endif
  159. #ifndef BOOST_ATOMIC_HAS_NATIVE_LONG_WAIT_NOTIFY
  160. #if BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 1
  161. #define BOOST_ATOMIC_HAS_NATIVE_LONG_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY
  162. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 2
  163. #define BOOST_ATOMIC_HAS_NATIVE_LONG_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  164. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 4
  165. #define BOOST_ATOMIC_HAS_NATIVE_LONG_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  166. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 8
  167. #define BOOST_ATOMIC_HAS_NATIVE_LONG_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  168. #else
  169. #define BOOST_ATOMIC_HAS_NATIVE_LONG_WAIT_NOTIFY 0
  170. #endif
  171. #endif
  172. #ifndef BOOST_ATOMIC_HAS_NATIVE_LONG_IPC_WAIT_NOTIFY
  173. #if BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 1
  174. #define BOOST_ATOMIC_HAS_NATIVE_LONG_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY
  175. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 2
  176. #define BOOST_ATOMIC_HAS_NATIVE_LONG_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  177. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 4
  178. #define BOOST_ATOMIC_HAS_NATIVE_LONG_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  179. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 8
  180. #define BOOST_ATOMIC_HAS_NATIVE_LONG_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  181. #else
  182. #define BOOST_ATOMIC_HAS_NATIVE_LONG_IPC_WAIT_NOTIFY 0
  183. #endif
  184. #endif
  185. #ifndef BOOST_ATOMIC_HAS_NATIVE_LLONG_WAIT_NOTIFY
  186. #if BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 1
  187. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY
  188. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 2
  189. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  190. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 4
  191. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  192. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 8
  193. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  194. #else
  195. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_WAIT_NOTIFY 0
  196. #endif
  197. #endif
  198. #ifndef BOOST_ATOMIC_HAS_NATIVE_LLONG_IPC_WAIT_NOTIFY
  199. #if BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 1
  200. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY
  201. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 2
  202. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  203. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 4
  204. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  205. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 8
  206. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  207. #else
  208. #define BOOST_ATOMIC_HAS_NATIVE_LLONG_IPC_WAIT_NOTIFY 0
  209. #endif
  210. #endif
  211. #ifndef BOOST_ATOMIC_HAS_NATIVE_POINTER_WAIT_NOTIFY
  212. #if (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 8
  213. #define BOOST_ATOMIC_HAS_NATIVE_POINTER_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  214. #elif (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 4
  215. #define BOOST_ATOMIC_HAS_NATIVE_POINTER_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  216. #else
  217. #define BOOST_ATOMIC_HAS_NATIVE_POINTER_WAIT_NOTIFY 0
  218. #endif
  219. #endif
  220. #define BOOST_ATOMIC_HAS_NATIVE_ADDRESS_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_POINTER_WAIT_NOTIFY
  221. #ifndef BOOST_ATOMIC_HAS_NATIVE_POINTER_IPC_WAIT_NOTIFY
  222. #if (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 8
  223. #define BOOST_ATOMIC_HAS_NATIVE_POINTER_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  224. #elif (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 4
  225. #define BOOST_ATOMIC_HAS_NATIVE_POINTER_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  226. #else
  227. #define BOOST_ATOMIC_HAS_NATIVE_POINTER_IPC_WAIT_NOTIFY 0
  228. #endif
  229. #endif
  230. #define BOOST_ATOMIC_HAS_NATIVE_ADDRESS_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_POINTER_IPC_WAIT_NOTIFY
  231. // We store bools in 1-byte storage in all backends
  232. #ifndef BOOST_ATOMIC_HAS_NATIVE_BOOL_WAIT_NOTIFY
  233. #define BOOST_ATOMIC_HAS_NATIVE_BOOL_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_WAIT_NOTIFY
  234. #endif
  235. #ifndef BOOST_ATOMIC_HAS_NATIVE_BOOL_IPC_WAIT_NOTIFY
  236. #define BOOST_ATOMIC_HAS_NATIVE_BOOL_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT8_IPC_WAIT_NOTIFY
  237. #endif
  238. #ifndef BOOST_ATOMIC_HAS_NATIVE_FLAG_WAIT_NOTIFY
  239. #define BOOST_ATOMIC_HAS_NATIVE_FLAG_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  240. #endif
  241. #ifndef BOOST_ATOMIC_HAS_NATIVE_FLAG_IPC_WAIT_NOTIFY
  242. #define BOOST_ATOMIC_HAS_NATIVE_FLAG_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  243. #endif
  244. #if !defined(BOOST_ATOMIC_NO_FLOATING_POINT)
  245. #if !defined(BOOST_ATOMIC_HAS_NATIVE_FLOAT_WAIT_NOTIFY) && defined(BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT)
  246. #if BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT == 2
  247. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  248. #elif BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT == 4
  249. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  250. #elif BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT == 8
  251. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  252. #elif BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT > 8 && BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT <= 16
  253. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT128_WAIT_NOTIFY
  254. #else
  255. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_WAIT_NOTIFY 0
  256. #endif
  257. #endif
  258. #if !defined(BOOST_ATOMIC_HAS_NATIVE_FLOAT_IPC_WAIT_NOTIFY) && defined(BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT)
  259. #if BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT == 2
  260. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  261. #elif BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT == 4
  262. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  263. #elif BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT == 8
  264. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  265. #elif BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT > 8 && BOOST_ATOMIC_DETAIL_SIZEOF_FLOAT <= 16
  266. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT128_IPC_WAIT_NOTIFY
  267. #else
  268. #define BOOST_ATOMIC_HAS_NATIVE_FLOAT_IPC_WAIT_NOTIFY 0
  269. #endif
  270. #endif
  271. #if !defined(BOOST_ATOMIC_HAS_NATIVE_DOUBLE_WAIT_NOTIFY) && defined(BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE)
  272. #if BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE == 2
  273. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  274. #elif BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE == 4
  275. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  276. #elif BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE == 8
  277. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  278. #elif BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE > 8 && BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE <= 16
  279. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT128_WAIT_NOTIFY
  280. #else
  281. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_WAIT_NOTIFY 0
  282. #endif
  283. #endif
  284. #if !defined(BOOST_ATOMIC_HAS_NATIVE_DOUBLE_IPC_WAIT_NOTIFY) && defined(BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE)
  285. #if BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE == 2
  286. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  287. #elif BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE == 4
  288. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  289. #elif BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE == 8
  290. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  291. #elif BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE > 8 && BOOST_ATOMIC_DETAIL_SIZEOF_DOUBLE <= 16
  292. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT128_IPC_WAIT_NOTIFY
  293. #else
  294. #define BOOST_ATOMIC_HAS_NATIVE_DOUBLE_IPC_WAIT_NOTIFY 0
  295. #endif
  296. #endif
  297. #if !defined(BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_WAIT_NOTIFY) && defined(BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE)
  298. #if BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE == 2
  299. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_WAIT_NOTIFY
  300. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE == 4
  301. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_WAIT_NOTIFY
  302. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE == 8
  303. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_WAIT_NOTIFY
  304. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE > 8 && BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE <= 16
  305. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT128_WAIT_NOTIFY
  306. #else
  307. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_WAIT_NOTIFY 0
  308. #endif
  309. #endif
  310. #if !defined(BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_IPC_WAIT_NOTIFY) && defined(BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE)
  311. #if BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE == 2
  312. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT16_IPC_WAIT_NOTIFY
  313. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE == 4
  314. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT32_IPC_WAIT_NOTIFY
  315. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE == 8
  316. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT64_IPC_WAIT_NOTIFY
  317. #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE > 8 && BOOST_ATOMIC_DETAIL_SIZEOF_LONG_DOUBLE <= 16
  318. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_IPC_WAIT_NOTIFY BOOST_ATOMIC_HAS_NATIVE_INT128_IPC_WAIT_NOTIFY
  319. #else
  320. #define BOOST_ATOMIC_HAS_NATIVE_LONG_DOUBLE_IPC_WAIT_NOTIFY 0
  321. #endif
  322. #endif
  323. #endif // !defined(BOOST_ATOMIC_NO_FLOATING_POINT)
  324. #endif // BOOST_ATOMIC_DETAIL_WAIT_CAPABILITIES_HPP_INCLUDED_