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.

static_mutex.hpp 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // detail/static_mutex.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_STATIC_MUTEX_HPP
  11. #define ASIO_DETAIL_STATIC_MUTEX_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. # include "asio/detail/null_static_mutex.hpp"
  18. #elif defined(ASIO_WINDOWS)
  19. # include "asio/detail/win_static_mutex.hpp"
  20. #elif defined(ASIO_HAS_PTHREADS)
  21. # include "asio/detail/posix_static_mutex.hpp"
  22. #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
  23. # include "asio/detail/std_static_mutex.hpp"
  24. #else
  25. # error Only Windows and POSIX are supported!
  26. #endif
  27. namespace asio {
  28. namespace detail {
  29. #if !defined(ASIO_HAS_THREADS)
  30. typedef null_static_mutex static_mutex;
  31. # define ASIO_STATIC_MUTEX_INIT ASIO_NULL_STATIC_MUTEX_INIT
  32. #elif defined(ASIO_WINDOWS)
  33. typedef win_static_mutex static_mutex;
  34. # define ASIO_STATIC_MUTEX_INIT ASIO_WIN_STATIC_MUTEX_INIT
  35. #elif defined(ASIO_HAS_PTHREADS)
  36. typedef posix_static_mutex static_mutex;
  37. # define ASIO_STATIC_MUTEX_INIT ASIO_POSIX_STATIC_MUTEX_INIT
  38. #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR)
  39. typedef std_static_mutex static_mutex;
  40. # define ASIO_STATIC_MUTEX_INIT ASIO_STD_STATIC_MUTEX_INIT
  41. #endif
  42. } // namespace detail
  43. } // namespace asio
  44. #endif // ASIO_DETAIL_STATIC_MUTEX_HPP