3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-15 15:25:26 +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

@ -24,6 +24,7 @@ Revision History:
#include "util/map.h"
#include "util/rlimit.h"
#include "util/scoped_ptr_vector.h"
#include <mutex>
namespace sat {
@ -70,7 +71,7 @@ namespace sat {
bool m_consumer_ready;
scoped_limits m_scoped_rlimit;
scoped_ptr_vector<reslimit> m_limits;
vector<reslimit> m_limits;
ptr_vector<solver> m_solvers;
public:
@ -88,7 +89,7 @@ namespace sat {
solver& get_solver(unsigned i) { return *m_solvers[i]; }
void cancel_solver(unsigned i) { m_limits[i]->cancel(); }
void cancel_solver(unsigned i) { m_limits[i].cancel(); }
// exchange unit literals
void exchange(solver& s, literal_vector const& in, unsigned& limit, literal_vector& out);