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:
parent
5fe0eeda63
commit
3b0c40044f
3 changed files with 14 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue