Add priority_mutex and priority_condition_variable. (#50)

Also provide wpi::mutex and wpi::condition_variable as wrappers for these
on Linux (where they're available), and for std::mutex and
std::condition_variable on other platforms.
This commit is contained in:
Peter Johnson
2017-11-12 20:56:29 -08:00
committed by GitHub
parent c9ead29f44
commit 9d8a508cd5
6 changed files with 827 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017 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 "priority_condition_variable.h"
namespace wpi {
#ifdef WPI_HAVE_PRIORITY_CONDITION_VARIABLE
using condition_variable = priority_condition_variable;
#else
using condition_variable = ::std::condition_variable;
#endif
} // namespace wpi