diff options
author | ACSYS <cvc4-devel@cs.nyu.edu> | 2010-09-27 22:26:46 +0000 |
---|---|---|
committer | ACSYS <cvc4-devel@cs.nyu.edu> | 2010-09-27 22:26:46 +0000 |
commit | 753a072c542c1c254d7c6adbf10e091ba585ede5 (patch) | |
tree | 5ab9157fe0d3f265f82a94f7f4e5940697b54ee5 /src/expr | |
parent | 595751a1814cc9375318c9c158caf6426eeda791 (diff) |
add workaround for systems (i.e., Mac OS X) that don't support __thread; also configure script auto-detection of __thread support and syntax
Diffstat (limited to 'src/expr')
-rw-r--r-- | src/expr/node_manager.cpp | 3 | ||||
-rw-r--r-- | src/expr/node_manager.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/expr/node_manager.cpp b/src/expr/node_manager.cpp index 1f15f7e29..31b848885 100644 --- a/src/expr/node_manager.cpp +++ b/src/expr/node_manager.cpp @@ -28,6 +28,7 @@ #include "theory/bv/theory_bv_type_rules.h" #include "util/Assert.h" +#include "util/tls.h" #include <ext/hash_set> #include <algorithm> @@ -38,7 +39,7 @@ using __gnu_cxx::hash_set; namespace CVC4 { -__thread NodeManager* NodeManager::s_current = 0; +CVC4_THREADLOCAL(NodeManager*) NodeManager::s_current = 0; /** * This class sets it reference argument to true and ensures that it gets set diff --git a/src/expr/node_manager.h b/src/expr/node_manager.h index bf1bed5f0..5fb7c57ad 100644 --- a/src/expr/node_manager.h +++ b/src/expr/node_manager.h @@ -38,6 +38,7 @@ #include "expr/node_value.h" #include "context/context.h" #include "util/configuration_private.h" +#include "util/tls.h" namespace CVC4 { @@ -70,7 +71,7 @@ class NodeManager { expr::NodeValueIDHashFunction, expr::NodeValueEq> ZombieSet; - static __thread NodeManager* s_current; + static CVC4_THREADLOCAL(NodeManager*) s_current; NodeValuePool d_nodeValuePool; |