diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2017-08-30 20:55:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-30 20:55:27 -0700 |
commit | 546d795470ca7c30fc62fe9b6c7b8e5838e1eed4 (patch) | |
tree | 443f7101c4246b684ce21a04704d769eb2db15ad /src/theory/arith/dual_simplex.cpp | |
parent | d7dadde871ae4775748695b0b7f9deee49576c0a (diff) |
Use thread_local instead of compiler extensions (#210)
C++11 introduced the thread_local keyword, so we don't need to use
non-standard extensions or our custom pthread extension anymore.
The behavior was previously introduced as a workaround in commit
753a072c542c1c254d7c6adbf10e091ba585ede5. This commit
introduces the macro CVC4_THREAD_LOCAL that can be used to
declare variables as thread local. For Swig, this macro is defined to
be empty.
Diffstat (limited to 'src/theory/arith/dual_simplex.cpp')
-rw-r--r-- | src/theory/arith/dual_simplex.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/theory/arith/dual_simplex.cpp b/src/theory/arith/dual_simplex.cpp index a40db89a7..ccab94221 100644 --- a/src/theory/arith/dual_simplex.cpp +++ b/src/theory/arith/dual_simplex.cpp @@ -17,6 +17,7 @@ #include "theory/arith/dual_simplex.h" #include "base/output.h" +#include "base/tls.h" #include "options/arith_options.h" #include "smt/smt_statistics_registry.h" #include "theory/arith/constraint.h" @@ -62,7 +63,7 @@ DualSimplexDecisionProcedure::Statistics::~Statistics(){ Result::Sat DualSimplexDecisionProcedure::dualFindModel(bool exactResult){ Assert(d_conflictVariables.empty()); - static CVC4_THREADLOCAL(unsigned int) instance = 0; + static CVC4_THREAD_LOCAL unsigned int instance = 0; instance = instance + 1; d_pivots = 0; |