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

turn locks into no-ops when compiled with -DSINGLE_THREAD

This commit is contained in:
Nuno Lopes 2019-06-05 12:11:27 +01:00
parent 9b375150eb
commit a53ff6f21c
17 changed files with 106 additions and 79 deletions

View file

@ -27,9 +27,14 @@ Revision History:
typedef unsigned int mpn_digit;
class mpn_manager {
#ifndef SINGLE_THREAD
std::recursive_mutex m_lock;
#define MPN_BEGIN_CRITICAL() m_lock.lock();
#define MPN_END_CRITICAL() m_lock.unlock();
#define MPN_BEGIN_CRITICAL() m_lock.lock()
#define MPN_END_CRITICAL() m_lock.unlock()
#else
#define MPN_BEGIN_CRITICAL() {}
#define MPN_END_CRITICAL() {}
#endif
public:
mpn_manager();