mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
logging cleanup
move everything out-of-line as common path doesn't log fix some race conditions on file ptr vs enable_logging vars
This commit is contained in:
parent
1f4a7c5101
commit
9b5ec6d004
5 changed files with 106 additions and 76 deletions
|
@ -16,6 +16,8 @@ Abstract:
|
|||
|
||||
template<typename T> using atomic = T;
|
||||
|
||||
#define ATOMIC_EXCHANGE(ret, var, val) ret = var; var = val
|
||||
|
||||
struct mutex {
|
||||
void lock() {}
|
||||
void unlock() {}
|
||||
|
@ -38,6 +40,7 @@ template<typename T> using atomic = std::atomic<T>;
|
|||
typedef std::mutex mutex;
|
||||
typedef std::lock_guard<std::mutex> lock_guard;
|
||||
|
||||
#define ATOMIC_EXCHANGE(ret, var, val) ret = var.exchange(val)
|
||||
#define DECLARE_MUTEX(name) mutex *name = nullptr
|
||||
#define DECLARE_INIT_MUTEX(name) mutex *name = new mutex
|
||||
#define ALLOC_MUTEX(name) name = alloc(mutex)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue