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.

posix_event.ipp 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // detail/impl/posix_event.ipp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2015 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_IMPL_POSIX_EVENT_IPP
  11. #define ASIO_DETAIL_IMPL_POSIX_EVENT_IPP
  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_PTHREADS)
  17. #include "asio/detail/posix_event.hpp"
  18. #include "asio/detail/throw_error.hpp"
  19. #include "asio/error.hpp"
  20. #include "asio/detail/push_options.hpp"
  21. namespace asio {
  22. namespace detail {
  23. posix_event::posix_event()
  24. : state_(0)
  25. {
  26. int error = ::pthread_cond_init(&cond_, 0);
  27. asio::error_code ec(error,
  28. asio::error::get_system_category());
  29. asio::detail::throw_error(ec, "event");
  30. }
  31. } // namespace detail
  32. } // namespace asio
  33. #include "asio/detail/pop_options.hpp"
  34. #endif // defined(ASIO_HAS_PTHREADS)
  35. #endif // ASIO_DETAIL_IMPL_POSIX_EVENT_IPP