3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00
This commit is contained in:
Nikolaj Bjorner 2016-12-17 16:03:02 -08:00
commit 5083b1adee
3 changed files with 12 additions and 13 deletions

View file

@ -2086,12 +2086,12 @@ class CppExampleComponent(ExampleComponent):
exefile = '%s$(EXE_EXT)' % self.name
out.write('%s: %s %s\n' % (exefile, dll, objfiles))
out.write('\t$(SLINK) $(SLINK_OUT_FLAG)%s $(SLINK_FLAGS) %s ' % (exefile, objfiles))
out.write('\t$(LINK) $(LINK_OUT_FLAG)%s $(LINK_FLAGS) %s ' % (exefile, objfiles))
if IS_WINDOWS:
out.write('%s.lib' % dll_name)
else:
out.write(dll)
out.write(' $(SLINK_EXTRA_FLAGS)\n')
out.write(' $(LINK_EXTRA_FLAGS)\n')
out.write('_ex_%s: %s\n\n' % (self.name, exefile))
class CExampleComponent(CppExampleComponent):

View file

@ -20,7 +20,7 @@ Revision History:
#include "common_msgs.h"
reslimit::reslimit():
m_cancel(false),
m_cancel(0),
m_count(0),
m_limit(0) {
}
@ -29,7 +29,6 @@ uint64 reslimit::count() const {
return m_count;
}
bool reslimit::inc() {
++m_count;
return m_cancel == 0 && (m_limit == 0 || m_count <= m_limit);
@ -46,7 +45,7 @@ void reslimit::push(unsigned delta_limit) {
new_limit = 0;
}
m_limits.push_back(m_limit);
m_limit = m_limit==0?new_limit:std::min(new_limit, m_limit);
m_limit = m_limit==0 ? new_limit : std::min(new_limit, m_limit);
m_cancel = 0;
}
@ -71,14 +70,14 @@ char const* reslimit::get_cancel_msg() const {
void reslimit::push_child(reslimit* r) {
#pragma omp critical (reslimit_cancel)
{
m_children.push_back(r);
m_children.push_back(r);
}
}
void reslimit::pop_child() {
#pragma omp critical (reslimit_cancel)
{
m_children.pop_back();
m_children.pop_back();
}
}
@ -99,7 +98,7 @@ void reslimit::reset_cancel() {
void reslimit::inc_cancel() {
#pragma omp critical (reslimit_cancel)
{
{
set_cancel(m_cancel+1);
}
}
@ -114,8 +113,8 @@ void reslimit::dec_cancel() {
}
}
void reslimit::set_cancel(unsigned f) {
m_cancel = f;
void reslimit::set_cancel(unsigned f) {
m_cancel = f;
for (unsigned i = 0; i < m_children.size(); ++i) {
m_children[i]->set_cancel(f);
}

View file

@ -29,8 +29,8 @@ class reslimit {
ptr_vector<reslimit> m_children;
void set_cancel(unsigned f);
public:
public:
reslimit();
void push(unsigned delta_limit);
void pop();
@ -39,7 +39,7 @@ public:
bool inc();
bool inc(unsigned offset);
uint64 count() const;
uint64 count() const;
bool get_cancel_flag() const { return m_cancel > 0; }