| 1 | |
|---|---|
| 2 | // Copyright Oliver Kowalke 2013. |
| 3 | // Distributed under the Boost Software License, Version 1.0. |
| 4 | // (See accompanying file LICENSE_1_0.txt or copy at |
| 5 | // http://www.boost.org/LICENSE_1_0.txt) |
| 6 | |
| 7 | #include "boost/fiber/condition_variable.hpp" |
| 8 | |
| 9 | #include "boost/fiber/context.hpp" |
| 10 | |
| 11 | #ifdef BOOST_HAS_ABI_HEADERS |
| 12 | # include BOOST_ABI_PREFIX |
| 13 | #endif |
| 14 | |
| 15 | namespace boost { |
| 16 | namespace fibers { |
| 17 | |
| 18 | void |
| 19 | condition_variable_any::notify_one() noexcept { |
| 20 | detail::spinlock_lock lk{ wait_queue_splk_ }; |
| 21 | wait_queue_.notify_one(); |
| 22 | } |
| 23 | |
| 24 | void |
| 25 | condition_variable_any::notify_all() noexcept { |
| 26 | detail::spinlock_lock lk{ wait_queue_splk_ }; |
| 27 | wait_queue_.notify_all(); |
| 28 | } |
| 29 | |
| 30 | }} |
| 31 | |
| 32 | #ifdef BOOST_HAS_ABI_HEADERS |
| 33 | # include BOOST_ABI_SUFFIX |
| 34 | #endif |
| 35 |
