mirror of
https://github.com/Z3Prover/z3
synced 2025-08-13 14:40:55 +00:00
replace remaining volatiles with atomic<>
volatiles are now deprecated in recent C++
This commit is contained in:
parent
a4aa87b6c9
commit
0213af3c61
7 changed files with 19 additions and 11 deletions
|
@ -47,6 +47,7 @@ tactic * mk_parallel_tactic(solver* s, params_ref const& p) {
|
|||
|
||||
#else
|
||||
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <cmath>
|
||||
|
@ -63,7 +64,7 @@ class parallel_tactic : public tactic {
|
|||
ptr_vector<solver_state> m_tasks;
|
||||
ptr_vector<solver_state> m_active;
|
||||
unsigned m_num_waiters;
|
||||
volatile bool m_shutdown;
|
||||
std::atomic<bool> m_shutdown;
|
||||
|
||||
void inc_wait() {
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
|
@ -365,7 +366,7 @@ private:
|
|||
unsigned m_branches;
|
||||
unsigned m_backtrack_frequency;
|
||||
unsigned m_conquer_delay;
|
||||
volatile bool m_has_undef;
|
||||
std::atomic<bool> m_has_undef;
|
||||
bool m_allsat;
|
||||
unsigned m_num_unsat;
|
||||
unsigned m_last_depth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue