Bug 1869190: Add threadsafety annotations to Bench.cpp r=xpcom-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D195985
This commit is contained in:
Randell Jesup 2023-12-11 17:09:04 +00:00
parent b9ade095dd
commit 65d35bfd22

View File

@ -268,11 +268,11 @@ class BenchCollections : public ::testing::Test {
private: private:
// Random values used in the benchmarks. // Random values used in the benchmarks.
static void** sVals; static void** sVals MOZ_GUARDED_BY(sValsMutex);
// A mutex that protects all benchmark operations, ensuring that two // A mutex that protects all benchmark operations, ensuring that two
// benchmarks never run concurrently. // benchmarks never run concurrently.
static StaticMutex sValsMutex MOZ_UNANNOTATED; static StaticMutex sValsMutex;
}; };
void** BenchCollections::sVals; void** BenchCollections::sVals;