mirror of
https://github.com/Z3Prover/z3
synced 2025-06-20 04:43:39 +00:00
add initialization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
583098b8b0
commit
71c38a08e5
13 changed files with 92 additions and 43 deletions
|
@ -16,8 +16,9 @@ Author:
|
|||
#include "util/rlimit.h"
|
||||
#include "util/gparams.h"
|
||||
#include <signal.h>
|
||||
#include <mutex>
|
||||
|
||||
static std::mutex display_stats_mux;
|
||||
extern std::mutex* g_stat_mux;
|
||||
|
||||
static lp::lp_solver<double, double>* g_solver = nullptr;
|
||||
|
||||
|
@ -30,14 +31,14 @@ static void display_statistics() {
|
|||
static void STD_CALL on_ctrl_c(int) {
|
||||
signal (SIGINT, SIG_DFL);
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(display_stats_mux);
|
||||
std::lock_guard<std::mutex> lock(*g_stat_mux);
|
||||
display_statistics();
|
||||
}
|
||||
raise(SIGINT);
|
||||
}
|
||||
|
||||
static void on_timeout() {
|
||||
std::lock_guard<std::mutex> lock(display_stats_mux);
|
||||
std::lock_guard<std::mutex> lock(*g_stat_mux);
|
||||
display_statistics();
|
||||
exit(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue