summaryrefslogtreecommitdiff
path: root/libs/binder/RpcState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r--libs/binder/RpcState.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index b5eaaa3413..5881703752 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -34,11 +34,10 @@ namespace android {
using base::ScopeGuard;
-#ifdef RPC_FLAKE_PRONE
+#if RPC_FLAKE_PRONE
void rpcMaybeWaitToFlake() {
- static std::random_device r;
- static std::mutex m;
-
+ [[clang::no_destroy]] static std::random_device r;
+ [[clang::no_destroy]] static std::mutex m;
unsigned num;
{
std::lock_guard<std::mutex> lock(m);