3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-11 13:40:52 +00:00

ensure limit children are safe for race conditions

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-12-12 10:18:51 -08:00
parent f8a804ba56
commit 4132fc2d91
6 changed files with 51 additions and 33 deletions

View file

@ -27,19 +27,23 @@ class reslimit {
uint64 m_limit;
svector<uint64> m_limits;
ptr_vector<reslimit> m_children;
void set_cancel(bool f);
public:
reslimit();
void push(unsigned delta_limit);
void pop();
void push_child(reslimit* r) { m_children.push_back(r); }
void pop_child() { m_children.pop_back(); }
void push_child(reslimit* r);
void pop_child();
bool inc();
bool inc(unsigned offset);
uint64 count() const;
bool cancel_flag_set() { return m_cancel; }
bool get_cancel_flag() const { return m_cancel; }
char const* get_cancel_msg() const;
void cancel();
void reset_cancel();
};