mirror of
https://github.com/Z3Prover/z3
synced 2025-06-08 23:23:23 +00:00
remove std::mutex, replace by util/mutex.h in api_solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
10edee48f3
commit
55225824ee
2 changed files with 4 additions and 3 deletions
|
@ -113,12 +113,12 @@ extern "C" {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Z3_solver_ref::set_eh(event_handler* eh) {
|
void Z3_solver_ref::set_eh(event_handler* eh) {
|
||||||
std::lock_guard<std::mutex> lock(m_mux);
|
lock_guard lock(m_mux);
|
||||||
m_eh = eh;
|
m_eh = eh;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Z3_solver_ref::set_cancel() {
|
void Z3_solver_ref::set_cancel() {
|
||||||
std::lock_guard<std::mutex> lock(m_mux);
|
lock_guard lock(m_mux);
|
||||||
if (m_eh) (*m_eh)(API_INTERRUPT_EH_CALLER);
|
if (m_eh) (*m_eh)(API_INTERRUPT_EH_CALLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ Revision History:
|
||||||
#ifndef API_SOLVER_H_
|
#ifndef API_SOLVER_H_
|
||||||
#define API_SOLVER_H_
|
#define API_SOLVER_H_
|
||||||
|
|
||||||
|
#include "util/mutex.h"
|
||||||
#include "api/api_util.h"
|
#include "api/api_util.h"
|
||||||
#include "solver/solver.h"
|
#include "solver/solver.h"
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ struct Z3_solver_ref : public api::object {
|
||||||
params_ref m_params;
|
params_ref m_params;
|
||||||
symbol m_logic;
|
symbol m_logic;
|
||||||
scoped_ptr<solver2smt2_pp> m_pp;
|
scoped_ptr<solver2smt2_pp> m_pp;
|
||||||
std::mutex m_mux;
|
mutex m_mux;
|
||||||
event_handler* m_eh;
|
event_handler* m_eh;
|
||||||
|
|
||||||
Z3_solver_ref(api::context& c, solver_factory * f):
|
Z3_solver_ref(api::context& c, solver_factory * f):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue