summaryrefslogtreecommitdiff
path: root/src/options/mkoptions.py
diff options
context:
space:
mode:
authorEverett Maus <ejm3y@virginia.edu>2020-12-04 17:09:54 -0800
committerGitHub <noreply@github.com>2020-12-04 17:09:54 -0800
commita3395c1a96a3f116254e026acd1ccd066b6e9e09 (patch)
treee52c0d995ee98bc40f246e27ef6e3951e4056d52 /src/options/mkoptions.py
parent1029d9d55d254372951448d1af08bec4d9d1a31a (diff)
Change generated options to be thread_local. (#5583)
Signed-off-by: Everett Maus <evmaus@google.com>
Diffstat (limited to 'src/options/mkoptions.py')
-rw-r--r--src/options/mkoptions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/options/mkoptions.py b/src/options/mkoptions.py
index 08f54f608..a12a0070b 100644
--- a/src/options/mkoptions.py
+++ b/src/options/mkoptions.py
@@ -175,7 +175,7 @@ TPL_OPTION_STRUCT_RW = \
bool wasSetByUser() const;
void set(const type& v);
const char* getName() const;
-}} {name} CVC4_PUBLIC;"""
+}} thread_local {name} CVC4_PUBLIC;"""
TPL_OPTION_STRUCT_RO = \
"""extern struct CVC4_PUBLIC {name}__option_t
@@ -184,7 +184,7 @@ TPL_OPTION_STRUCT_RO = \
type operator()() const;
bool wasSetByUser() const;
const char* getName() const;
-}} {name} CVC4_PUBLIC;"""
+}} thread_local {name} CVC4_PUBLIC;"""
TPL_DECL_SET = \
@@ -629,7 +629,7 @@ def codegen_module(module, dst_dir, tpl_module_h, tpl_module_cpp):
accs.append(TPL_IMPL_WAS_SET_BY_USER.format(name=option.name))
# Global definitions
- defs.append('struct {name}__option_t {name};'.format(name=option.name))
+ defs.append('thread_local struct {name}__option_t {name};'.format(name=option.name))
if option.mode:
values = option.mode.keys()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback