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.

null_signal_blocker.hpp 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // detail/null_signal_blocker.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_NULL_SIGNAL_BLOCKER_HPP
  11. #define ASIO_DETAIL_NULL_SIGNAL_BLOCKER_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_WINDOWS) \
  18. || defined(ASIO_WINDOWS_RUNTIME) \
  19. || defined(__CYGWIN__) \
  20. || defined(__SYMBIAN32__)
  21. #include "asio/detail/noncopyable.hpp"
  22. #include "asio/detail/push_options.hpp"
  23. namespace asio {
  24. namespace detail {
  25. class null_signal_blocker
  26. : private noncopyable
  27. {
  28. public:
  29. // Constructor blocks all signals for the calling thread.
  30. null_signal_blocker()
  31. {
  32. }
  33. // Destructor restores the previous signal mask.
  34. ~null_signal_blocker()
  35. {
  36. }
  37. // Block all signals for the calling thread.
  38. void block()
  39. {
  40. }
  41. // Restore the previous signal mask.
  42. void unblock()
  43. {
  44. }
  45. };
  46. } // namespace detail
  47. } // namespace asio
  48. #include "asio/detail/pop_options.hpp"
  49. #endif // !defined(ASIO_HAS_THREADS)
  50. // || defined(ASIO_WINDOWS)
  51. // || defined(ASIO_WINDOWS_RUNTIME)
  52. // || defined(__CYGWIN__)
  53. // || defined(__SYMBIAN32__)
  54. #endif // ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP