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/main/main.h | |
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/main/main.h')
-rw-r--r-- | src/main/main.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/main.h b/src/main/main.h index dcb5c2a0a..8a5d0971e 100644 --- a/src/main/main.h +++ b/src/main/main.h @@ -17,8 +17,8 @@ #include <exception> #include <string> -#include "base/exception.h" #include "base/tls.h" +#include "base/exception.h" #include "cvc4autoconfig.h" #include "expr/expr_manager.h" #include "options/options.h" @@ -54,7 +54,7 @@ extern CVC4::TimerStat* pTotalTime; extern bool segvSpin; /** A pointer to the options in play */ -extern CVC4_THREADLOCAL(Options*) pOptions; +extern CVC4_THREAD_LOCAL Options* pOptions; /** Initialize the driver. Sets signal handlers for SIGINT and SIGSEGV. */ void cvc4_init() throw(Exception); |