3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-27 05:26:01 +00:00

restore most global muxes as heap-allocated to avoid crashes with hard-kills like ctrl-c

This commit is contained in:
Nuno Lopes 2019-06-13 18:42:57 +01:00
parent d17248821a
commit c21f0c2f00
8 changed files with 55 additions and 49 deletions

View file

@ -25,6 +25,8 @@ struct lock_guard {
lock_guard(mutex &) {}
};
#define DECLARE_MUTEX(name) mutex *name = nullptr
#else
#include <atomic>
#include <mutex>
@ -32,4 +34,6 @@ struct lock_guard {
template<typename T> using atomic = std::atomic<T>;
typedef std::mutex mutex;
typedef std::lock_guard<std::mutex> lock_guard;
#define DECLARE_MUTEX(name) mutex *name = new mutex
#endif