summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2012-03-29 19:53:20 +0000
committerTim King <taking@cs.nyu.edu>2012-03-29 19:53:20 +0000
commit889d34864fb2218516fd18250e4f086213f14611 (patch)
tree37c99cf9755781c38a6440830ec0bc7dd972615a /src
parentaf9a90a1b3df29f7955d255aff1fd26e9957018d (diff)
Fix for bug 316. If the flag @CVC4_TLS_SUPPORTED@ is false, function pointers cannot be directly used with the CVC4_THREADLOCAL macro. This is why there were problems on macs.
Diffstat (limited to 'src')
-rw-r--r--src/theory/bv/theory_bv_rewriter.cpp2
-rw-r--r--src/theory/bv/theory_bv_rewriter.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/theory/bv/theory_bv_rewriter.cpp b/src/theory/bv/theory_bv_rewriter.cpp
index 586f37073..2b48977b6 100644
--- a/src/theory/bv/theory_bv_rewriter.cpp
+++ b/src/theory/bv/theory_bv_rewriter.cpp
@@ -33,7 +33,7 @@ using namespace CVC4::theory::bv;
// CVC4_THREADLOCAL(AllRewriteRules*) TheoryBVRewriter::s_allRules = NULL;
// CVC4_THREADLOCAL(TimerStat*) TheoryBVRewriter::d_rewriteTimer = NULL;
-CVC4_THREADLOCAL(RewriteFunction) TheoryBVRewriter::d_rewriteTable[kind::LAST_KIND];
+RewriteFunction TheoryBVRewriter::d_rewriteTable[kind::LAST_KIND];
void TheoryBVRewriter::init() {
// s_allRules = new AllRewriteRules;
// d_rewriteTimer = new TimerStat("theory::bv::rewriteTimer");
diff --git a/src/theory/bv/theory_bv_rewriter.h b/src/theory/bv/theory_bv_rewriter.h
index e72c1a910..7ce914477 100644
--- a/src/theory/bv/theory_bv_rewriter.h
+++ b/src/theory/bv/theory_bv_rewriter.h
@@ -35,7 +35,9 @@ typedef RewriteResponse (*RewriteFunction) (TNode);
class TheoryBVRewriter {
// static CVC4_THREADLOCAL(AllRewriteRules*) s_allRules;
// static CVC4_THREADLOCAL(TimerStat*) d_rewriteTimer;
- static CVC4_THREADLOCAL(RewriteFunction) d_rewriteTable[kind::LAST_KIND];
+
+#warning "TODO: Double check thread safety and make sure the fix compiles on mac."
+ static RewriteFunction d_rewriteTable[kind::LAST_KIND];
static RewriteResponse IdentityRewrite(TNode node);
static RewriteResponse UndefinedRewrite(TNode node);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback