3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

SINGLE_THREAD: do not use pthread if possible (#4382)

This commit is contained in:
Alexey Vishnyakov 2020-05-19 19:45:41 +03:00 committed by GitHub
parent 5fe0eeda63
commit 3b0c40044f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 14 deletions

View file

@ -16,18 +16,18 @@ Revision History:
--*/
#include<fstream>
#include<mutex>
#include "api/z3.h"
#include "api/api_log_macros.h"
#include "util/util.h"
#include "util/z3_version.h"
#include "util/mutex.h"
std::ostream * g_z3_log = nullptr;
std::atomic<bool> g_z3_log_enabled;
#ifdef Z3_LOG_SYNC
static std::mutex g_log_mux;
#define SCOPED_LOCK() std::lock_guard<std::mutex> lock(g_log_mux)
static mutex g_log_mux;
#define SCOPED_LOCK() lock_guard lock(g_log_mux)
#else
#define SCOPED_LOCK() {}
#endif