mirror of
https://github.com/Z3Prover/z3
synced 2025-10-05 15:33:59 +00:00
bug fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
9ebe980b44
commit
5752830f71
10 changed files with 112 additions and 46 deletions
|
@ -425,6 +425,8 @@ public:
|
|||
return r;
|
||||
}
|
||||
|
||||
// unfortunately, params_ref is not thread safe
|
||||
// so better create a local copy of the parameters.
|
||||
params_ref get_module(symbol const & module_name) {
|
||||
params_ref result;
|
||||
params_ref * ps = 0;
|
||||
|
|
|
@ -333,8 +333,21 @@ public:
|
|||
reset();
|
||||
}
|
||||
|
||||
void inc_ref() { m_ref_count++; }
|
||||
void dec_ref() { SASSERT(m_ref_count > 0); m_ref_count--; if (m_ref_count == 0) dealloc(this); }
|
||||
void inc_ref() {
|
||||
#pragma omp critical (params)
|
||||
{
|
||||
m_ref_count++;
|
||||
}
|
||||
}
|
||||
void dec_ref() {
|
||||
bool is_last;
|
||||
SASSERT(m_ref_count > 0);
|
||||
#pragma omp critical (params)
|
||||
{
|
||||
is_last = 0 == --m_ref_count;
|
||||
}
|
||||
if (is_last) dealloc(this);
|
||||
}
|
||||
|
||||
bool empty() const { return m_entries.empty(); }
|
||||
bool contains(symbol const & k) const;
|
||||
|
@ -344,7 +357,6 @@ public:
|
|||
void reset(symbol const & k);
|
||||
void reset(char const * k);
|
||||
|
||||
|
||||
void validate(param_descrs const & p) {
|
||||
svector<params::entry>::iterator it = m_entries.begin();
|
||||
svector<params::entry>::iterator end = m_entries.end();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue