mirror of
https://github.com/Z3Prover/z3
synced 2025-08-08 12:11:23 +00:00
support threading for TRACE mode
This commit is contained in:
parent
4b7c08d08d
commit
3036b88f09
7 changed files with 64 additions and 55 deletions
|
@ -19,14 +19,6 @@ Revision History:
|
|||
|
||||
#include "util/util.h"
|
||||
|
||||
#ifndef SINGLE_THREAD
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
static std::mutex g_verbose_mux;
|
||||
void verbose_lock() { g_verbose_mux.lock(); }
|
||||
void verbose_unlock() { g_verbose_mux.unlock(); }
|
||||
#endif
|
||||
|
||||
static unsigned g_verbosity_level = 0;
|
||||
|
||||
|
@ -44,16 +36,6 @@ void set_verbose_stream(std::ostream& str) {
|
|||
g_verbose_stream = &str;
|
||||
}
|
||||
|
||||
#ifndef SINGLE_THREAD
|
||||
static std::thread::id g_thread_id = std::this_thread::get_id();
|
||||
static bool g_is_threaded = false;
|
||||
|
||||
bool is_threaded() {
|
||||
if (g_is_threaded) return true;
|
||||
g_is_threaded = std::this_thread::get_id() != g_thread_id;
|
||||
return g_is_threaded;
|
||||
}
|
||||
#endif
|
||||
|
||||
std::ostream& verbose_stream() {
|
||||
return *g_verbose_stream;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue