mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
bfac44f7ed
commit
e4d24fd2c3
10 changed files with 21 additions and 19 deletions
|
@ -20,6 +20,7 @@ Revision History:
|
|||
#ifdef _WINDOWS
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <thread>
|
||||
#include "util/util.h"
|
||||
|
||||
static unsigned g_verbosity_level = 0;
|
||||
|
@ -38,7 +39,11 @@ void set_verbose_stream(std::ostream& str) {
|
|||
g_verbose_stream = &str;
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS
|
||||
static int g_thread_id = 0;
|
||||
#else
|
||||
static std::thread::id g_thread_id = std::this_thread::get_id();
|
||||
#endif
|
||||
static bool g_is_threaded = false;
|
||||
|
||||
bool is_threaded() {
|
||||
|
@ -47,6 +52,8 @@ bool is_threaded() {
|
|||
int thid = GetCurrentThreadId();
|
||||
g_is_threaded = g_thread_id != thid && g_thread_id != 0;
|
||||
g_thread_id = thid;
|
||||
#else
|
||||
g_is_threaded = std::this_thread::get_id() != g_thread_id;
|
||||
#endif
|
||||
return g_is_threaded;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue