Files
allwpilib/wpiutil/src/main/native/include/wpi/condition_variable.h
Tyler Veness 26c33a9a56 Remove priority_condition_variable (#1337)
Make wpi::condition_variable typedef to std::condition_variable_any if
wpi::mutex typedefs to priority_mutex.

priority_condition_variable was originally intended as a copy of
std::condition_variable_any that also returned the internal handle like
std::condition_variable. This was needed because NetComm required a
pthread_cond_t. We no longer use it anywhere.

Its args were specialized for priority_mutex, but
std::condition_variable_any supports this and more through
templatization.
2018-09-25 21:38:52 -07:00

23 lines
787 B
C++

/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include <condition_variable>
#include "wpi/priority_mutex.h"
namespace wpi {
#if defined(__linux__) && defined(WPI_HAVE_PRIORITY_MUTEX)
using condition_variable = ::std::condition_variable_any;
#else
using condition_variable = ::std::condition_variable;
#endif
} // namespace wpi