Commit 6829ab70 authored by Aaryaman Sagar's avatar Aaryaman Sagar Committed by Facebook Github Bot

Make DistributedMutex build on mobile ARM

Summary:
std::max() is not constexpr for the platform we build with on android for some
reason

Reviewed By: yfeldblum

Differential Revision: D15848911

fbshipit-source-id: aa8b62514b0b1b23f9a179736c2e79885ddf8689
parent da41b65e
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#include <folly/synchronization/DistributedMutex.h> #include <folly/synchronization/DistributedMutex.h>
#include <folly/ConstexprMath.h>
#include <folly/Likely.h> #include <folly/Likely.h>
#include <folly/Portability.h> #include <folly/Portability.h>
#include <folly/ScopeGuard.h> #include <folly/ScopeGuard.h>
...@@ -518,7 +519,7 @@ class TaskWithBigReturnValue { ...@@ -518,7 +519,7 @@ class TaskWithBigReturnValue {
// ensure we avoid false-sharing with the metadata used while the waiter // ensure we avoid false-sharing with the metadata used while the waiter
// waits // waits
using ReturnType = folly::invoke_result_t<const Func&>; using ReturnType = folly::invoke_result_t<const Func&>;
static const auto kReturnValueAlignment = std::max( static const auto kReturnValueAlignment = folly::constexpr_max(
alignof(ReturnType), alignof(ReturnType),
folly::hardware_destructive_interference_size); folly::hardware_destructive_interference_size);
using StorageType = std::aligned_storage_t< using StorageType = std::aligned_storage_t<
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment