Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ inline std::string HumanReadableNumber(double n) {
// For non-dense Range, intermediate values are powers of kRangeMultiplier.
static const int kRangeMultiplier = 8;

static pthread_mutex_t benchmark_mutex;
static pthread_mutex_t benchmark_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t starting_mutex;
pthread_cond_t starting_cv;

Expand Down Expand Up @@ -1222,11 +1222,9 @@ void RunSpecifiedBenchmarks(const BenchmarkReporter* reporter /*= nullptr*/) {
spec, reporter == nullptr ? &default_reporter : reporter);
pthread_cond_destroy(&starting_cv);
pthread_mutex_destroy(&starting_mutex);
pthread_mutex_destroy(&benchmark_mutex);
}

void Initialize(int* argc, const char** argv) {
pthread_mutex_init(&benchmark_mutex, nullptr);
pthread_mutex_init(&starting_mutex, nullptr);
pthread_cond_init(&starting_cv, nullptr);
walltime::Initialize();
Expand Down