3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 03:45:51 +00:00

support threading for TRACE mode

This commit is contained in:
Nikolaj Bjorner 2021-10-25 13:35:23 +02:00
parent 4b7c08d08d
commit 3036b88f09
7 changed files with 64 additions and 55 deletions

View file

@ -169,37 +169,11 @@ void set_verbosity_level(unsigned lvl);
unsigned get_verbosity_level();
std::ostream& verbose_stream();
void set_verbose_stream(std::ostream& str);
#ifdef SINGLE_THREAD
# define is_threaded() false
#else
bool is_threaded();
#endif
#define IF_VERBOSE(LVL, CODE) { \
if (get_verbosity_level() >= LVL) { \
if (is_threaded()) { \
LOCK_CODE(CODE); \
} \
else { \
CODE; \
} \
} } ((void) 0)
#define IF_VERBOSE(LVL, CODE) { if (get_verbosity_level() >= LVL) { THREAD_LOCK(CODE); } } ((void) 0)
#ifdef SINGLE_THREAD
#define LOCK_CODE(CODE) CODE;
#else
void verbose_lock();
void verbose_unlock();
#define LOCK_CODE(CODE) \
{ \
verbose_lock(); \
CODE; \
verbose_unlock(); \
}
#endif
template<typename T>
struct default_eq {