#pragma once
#include <folly/detail/Futex.h>
#include <folly/synchronization/ParkingLot.h>
namespace folly {
namespace detail {
namespace atomic_notification {
static_assert …;
inline std::cv_status toCvStatus(FutexResult result) { … }
inline std::cv_status toCvStatus(ParkResult result) { … }
extern ParkingLot<std::uint32_t> parkingLot;
template <template <typename...> class Atom, typename... Args>
void atomic_wait_impl(
const Atom<std::uint32_t, Args...>* atomic, std::uint32_t old) { … }
template <template <typename...> class Atom, typename Integer, typename... Args>
void atomic_wait_impl(const Atom<Integer, Args...>* atomic, Integer old) { … }
template <
template <typename...>
class Atom,
typename... Args,
typename Clock,
typename Duration>
std::cv_status atomic_wait_until_impl(
const Atom<std::uint32_t, Args...>* atomic,
std::uint32_t expected,
const std::chrono::time_point<Clock, Duration>& deadline) { … }
template <
template <typename...>
class Atom,
typename Integer,
typename... Args,
typename Clock,
typename Duration>
std::cv_status atomic_wait_until_impl(
const Atom<Integer, Args...>* atomic,
Integer expected,
const std::chrono::time_point<Clock, Duration>& deadline) { … }
template <template <typename...> class Atom, typename... Args>
void atomic_notify_one_impl(const Atom<std::uint32_t, Args...>* atomic) { … }
template <template <typename...> class Atom, typename Integer, typename... Args>
void atomic_notify_one_impl(const Atom<Integer, Args...>* atomic) { … }
template <template <typename...> class Atom, typename... Args>
void atomic_notify_all_impl(const Atom<std::uint32_t, Args...>* atomic) { … }
template <template <typename...> class Atom, typename Integer, typename... Args>
void atomic_notify_all_impl(const Atom<Integer, Args...>* atomic) { … }
template <typename Integer>
void tag_invoke(
atomic_wait_fn, const std::atomic<Integer>* atomic, Integer expected) { … }
template <typename Integer, typename Clock, typename Duration>
std::cv_status tag_invoke(
atomic_wait_until_fn,
const std::atomic<Integer>* atomic,
Integer expected,
const std::chrono::time_point<Clock, Duration>& deadline) { … }
template <typename Integer>
void tag_invoke(atomic_notify_one_fn, const std::atomic<Integer>* atomic) { … }
template <typename Integer>
void tag_invoke(atomic_notify_all_fn, const std::atomic<Integer>* atomic) { … }
}
}
}