From de5d7d3c17ad2a651e60e96cf41c01c81bbeaef5 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 3 Jul 2018 20:35:07 -0700 Subject: [PATCH] Only use priority_mutex on RoboRIO by default. (#1172) On all Linux platforms it can be specifically requested by defining WPI_USE_PRIORITY_MUTEX. --- wpiutil/src/main/native/include/wpi/priority_mutex.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wpiutil/src/main/native/include/wpi/priority_mutex.h b/wpiutil/src/main/native/include/wpi/priority_mutex.h index 800c550bcd..f9d6e6bd84 100644 --- a/wpiutil/src/main/native/include/wpi/priority_mutex.h +++ b/wpiutil/src/main/native/include/wpi/priority_mutex.h @@ -16,7 +16,11 @@ namespace wpi { -#ifdef __linux__ +#if defined(__FRC_ROBORIO__) && !defined(WPI_USE_PRIORITY_MUTEX) +#define WPI_USE_PRIORITY_MUTEX +#endif + +#if defined(WPI_USE_PRIORITY_MUTEX) && defined(__linux__) #define WPI_HAVE_PRIORITY_MUTEX 1 @@ -79,6 +83,6 @@ class priority_mutex { #endif }; -#endif // __linux__ +#endif // defined(WPI_USE_PRIORITY_MUTEX) && defined(__linux__) } // namespace wpi