Bug 1463758: Don't use sequentially consistent atomic operations in RacyFeatures. r=mstange

Relaxed is more than enough for this use.

MozReview-Commit-ID: 6BGfEU83s7Y

--HG--
extra : rebase_source : ede8f47a5213ae64ed3dbf08a99d2a4a3789c1a2
This commit is contained in:
Emilio Cobos Álvarez 2018-05-23 16:44:53 +02:00
parent 5ecb7246f5
commit 08d4ae50ba
2 changed files with 2 additions and 2 deletions

View File

@ -696,7 +696,7 @@ uint32_t ActivePS::sNextGeneration = 0;
// The mutex that guards accesses to CorePS and ActivePS.
static PSMutex gPSMutex;
Atomic<uint32_t> RacyFeatures::sActiveAndFeatures(0);
Atomic<uint32_t, MemoryOrdering::Relaxed> RacyFeatures::sActiveAndFeatures(0);
// Each live thread has a RegisteredThread, and we store a reference to it in TLS.
// This class encapsulates that TLS.

View File

@ -206,7 +206,7 @@ private:
// We combine the active bit with the feature bits so they can be read or
// written in a single atomic operation.
static mozilla::Atomic<uint32_t> sActiveAndFeatures;
static mozilla::Atomic<uint32_t, mozilla::MemoryOrdering::Relaxed> sActiveAndFeatures;
};
} // namespace detail