Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fenced_block.hpp 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // detail/fenced_block.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef ASIO_DETAIL_FENCED_BLOCK_HPP
  11. #define ASIO_DETAIL_FENCED_BLOCK_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include "asio/detail/config.hpp"
  16. #if !defined(ASIO_HAS_THREADS) \
  17. || defined(ASIO_DISABLE_FENCED_BLOCK)
  18. # include "asio/detail/null_fenced_block.hpp"
  19. #elif defined(ASIO_HAS_STD_ATOMIC)
  20. # include "asio/detail/std_fenced_block.hpp"
  21. #elif defined(__MACH__) && defined(__APPLE__)
  22. # include "asio/detail/macos_fenced_block.hpp"
  23. #elif defined(__sun)
  24. # include "asio/detail/solaris_fenced_block.hpp"
  25. #elif defined(__GNUC__) && defined(__arm__) \
  26. && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
  27. # include "asio/detail/gcc_arm_fenced_block.hpp"
  28. #elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
  29. # include "asio/detail/gcc_hppa_fenced_block.hpp"
  30. #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
  31. # include "asio/detail/gcc_x86_fenced_block.hpp"
  32. #elif defined(__GNUC__) \
  33. && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
  34. && !defined(__INTEL_COMPILER) && !defined(__ICL) \
  35. && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
  36. # include "asio/detail/gcc_sync_fenced_block.hpp"
  37. #elif defined(ASIO_WINDOWS) && !defined(UNDER_CE)
  38. # include "asio/detail/win_fenced_block.hpp"
  39. #else
  40. # include "asio/detail/null_fenced_block.hpp"
  41. #endif
  42. namespace asio {
  43. namespace detail {
  44. #if !defined(ASIO_HAS_THREADS) \
  45. || defined(ASIO_DISABLE_FENCED_BLOCK)
  46. typedef null_fenced_block fenced_block;
  47. #elif defined(ASIO_HAS_STD_ATOMIC)
  48. typedef std_fenced_block fenced_block;
  49. #elif defined(__MACH__) && defined(__APPLE__)
  50. typedef macos_fenced_block fenced_block;
  51. #elif defined(__sun)
  52. typedef solaris_fenced_block fenced_block;
  53. #elif defined(__GNUC__) && defined(__arm__) \
  54. && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
  55. typedef gcc_arm_fenced_block fenced_block;
  56. #elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
  57. typedef gcc_hppa_fenced_block fenced_block;
  58. #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
  59. typedef gcc_x86_fenced_block fenced_block;
  60. #elif defined(__GNUC__) \
  61. && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
  62. && !defined(__INTEL_COMPILER) && !defined(__ICL) \
  63. && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
  64. typedef gcc_sync_fenced_block fenced_block;
  65. #elif defined(ASIO_WINDOWS) && !defined(UNDER_CE)
  66. typedef win_fenced_block fenced_block;
  67. #else
  68. typedef null_fenced_block fenced_block;
  69. #endif
  70. } // namespace detail
  71. } // namespace asio
  72. #endif // ASIO_DETAIL_FENCED_BLOCK_HPP