#include "absl/synchronization/internal/pthread_waiter.h"
#ifdef ABSL_INTERNAL_HAVE_PTHREAD_WAITER
#include <pthread.h>
#include <sys/time.h>
#include <unistd.h>
#include <cassert>
#include <cerrno>
#include "absl/base/config.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/thread_identity.h"
#include "absl/base/optimization.h"
#include "absl/synchronization/internal/kernel_timeout.h"
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace synchronization_internal {
namespace {
class PthreadMutexHolder { … };
}
#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
constexpr char PthreadWaiter::kName[];
#endif
PthreadWaiter::PthreadWaiter() : … { … }
#ifdef __APPLE__
#define ABSL_INTERNAL_HAS_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP …
#endif
#if defined(__GLIBC__) && \
(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 30))
#define ABSL_INTERNAL_HAVE_PTHREAD_COND_CLOCKWAIT …
#elif defined(__ANDROID_API__) && __ANDROID_API__ >= 30
#define ABSL_INTERNAL_HAVE_PTHREAD_COND_CLOCKWAIT …
#endif
int PthreadWaiter::TimedWait(KernelTimeout t) { … }
bool PthreadWaiter::Wait(KernelTimeout t) { … }
void PthreadWaiter::Post() { … }
void PthreadWaiter::Poke() { … }
void PthreadWaiter::InternalCondVarPoke() { … }
}
ABSL_NAMESPACE_END
}
#endif