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:
parent
9b375150eb
commit
a53ff6f21c
17 changed files with 106 additions and 79 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue