3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 19:05:51 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-06-03 19:50:25 -07:00 committed by Nuno Lopes
parent 2788f72bbb
commit 9262908ebb
30 changed files with 191 additions and 341 deletions

View file

@ -25,6 +25,7 @@ static bool g_first_interrupt = true;
static opt::context* g_opt = nullptr;
static double g_start_time = 0;
static unsigned_vector g_handles;
static std::mutex display_stats_mux;
@ -68,8 +69,8 @@ static void STD_CALL on_ctrl_c(int) {
}
else {
signal (SIGINT, SIG_DFL);
#pragma omp critical (g_display_stats)
{
std::lock_guard<std::mutex> lock(display_stats_mux);
display_statistics();
}
raise(SIGINT);
@ -77,11 +78,11 @@ static void STD_CALL on_ctrl_c(int) {
}
static void on_timeout() {
#pragma omp critical (g_display_stats)
{
std::lock_guard<std::mutex> lock(display_stats_mux);
display_statistics();
exit(0);
}
exit(0);
}
static unsigned parse_opt(std::istream& in, opt_format f) {
@ -131,8 +132,8 @@ static unsigned parse_opt(std::istream& in, opt_format f) {
catch (z3_exception & ex) {
std::cerr << ex.msg() << "\n";
}
#pragma omp critical (g_display_stats)
{
std::lock_guard<std::mutex> lock(display_stats_mux);
display_statistics();
register_on_timeout_proc(nullptr);
g_opt = nullptr;