summaryrefslogtreecommitdiff
path: root/src/smt/smt_engine_scope.cpp
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2017-08-30 20:55:27 -0700
committerGitHub <noreply@github.com>2017-08-30 20:55:27 -0700
commit546d795470ca7c30fc62fe9b6c7b8e5838e1eed4 (patch)
tree443f7101c4246b684ce21a04704d769eb2db15ad /src/smt/smt_engine_scope.cpp
parentd7dadde871ae4775748695b0b7f9deee49576c0a (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/smt/smt_engine_scope.cpp')
-rw-r--r--src/smt/smt_engine_scope.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/smt/smt_engine_scope.cpp b/src/smt/smt_engine_scope.cpp
index 6c360cdc9..d5fb87dbc 100644
--- a/src/smt/smt_engine_scope.cpp
+++ b/src/smt/smt_engine_scope.cpp
@@ -17,6 +17,7 @@
#include "smt/smt_engine_scope.h"
+#include "base/tls.h"
#include "base/configuration_private.h"
#include "base/cvc4_assert.h"
#include "base/output.h"
@@ -27,7 +28,7 @@
namespace CVC4 {
namespace smt {
-CVC4_THREADLOCAL(SmtEngine*) s_smtEngine_current = NULL;
+CVC4_THREAD_LOCAL SmtEngine* s_smtEngine_current = NULL;
SmtEngine* currentSmtEngine() {
Assert(s_smtEngine_current != NULL);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback