0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-28 17:52:54 +01:00

ircd::spirit: Fixes for thread_local generator_state linkage related.

This commit is contained in:
Jason Volk 2021-03-01 14:45:25 -08:00
parent cc9df943a7
commit b55d670af1
3 changed files with 12 additions and 20 deletions

View file

@ -14,12 +14,6 @@
/// it involves extremely expensive boost headers for creating formal spirit
/// grammars. This file is automatically included in the spirit.h group.
#ifdef __clang__
#define IRCD_SPIRIT_GSPTR_LINKAGE static
#else
#define IRCD_SPIRIT_GSPTR_LINKAGE extern
#endif
namespace ircd {
namespace spirit
__attribute__((visibility("default")))
@ -31,7 +25,7 @@ __attribute__((visibility("default")))
generator_buffer_size {64_KiB},
generator_buffer_count {8};
IRCD_SPIRIT_GSPTR_LINKAGE thread_local struct generator_state *
extern thread_local struct generator_state *
generator_state;
extern thread_local char
@ -70,7 +64,7 @@ __attribute__((visibility("internal")))
/// height of any stack growing from an ircd::spirit::generate() call without
/// need for reentrancy. This gives us the ability to pre-allocate thread_local
/// buffers.
struct [[gnu::visibility("hidden")]]
struct [[gnu::visibility("internal")]]
ircd::spirit::generator_state
{
/// The number of instances stacked behind the current state. This should

View file

@ -143,32 +143,32 @@ endif
libircd_la_SOURCES =#
libircd_la_SOURCES += default.profdata
libircd_la_SOURCES += assert.cc
libircd_la_SOURCES += info.cc
libircd_la_SOURCES += vg.cc
libircd_la_SOURCES += allocator.cc
libircd_la_SOURCES += allocator_gnu.cc
libircd_la_SOURCES += allocator_je.cc
libircd_la_SOURCES += exception.cc
libircd_la_SOURCES += util.cc
libircd_la_SOURCES += demangle.cc
libircd_la_SOURCES += backtrace.cc
libircd_la_SOURCES += simd.cc
libircd_la_SOURCES += fpe.cc
libircd_la_SOURCES += parse.cc
libircd_la_SOURCES += lex_cast.cc
libircd_la_SOURCES += info.cc
libircd_la_SOURCES += allocator.cc
libircd_la_SOURCES += allocator_gnu.cc
libircd_la_SOURCES += allocator_je.cc
libircd_la_SOURCES += util.cc
libircd_la_SOURCES += rand.cc
libircd_la_SOURCES += fmt.cc
libircd_la_SOURCES += timedate.cc
if ICU
libircd_la_SOURCES += icu.cc
endif
libircd_la_SOURCES += utf.cc
libircd_la_SOURCES += timedate.cc
libircd_la_SOURCES += lex_cast.cc
libircd_la_SOURCES += stringops.cc
libircd_la_SOURCES += globular.cc
libircd_la_SOURCES += tokens.cc
libircd_la_SOURCES += parse.cc
libircd_la_SOURCES += rand.cc
libircd_la_SOURCES += b64.cc
libircd_la_SOURCES += b58.cc
libircd_la_SOURCES += crh.cc
libircd_la_SOURCES += fmt.cc
libircd_la_SOURCES += json.cc
libircd_la_SOURCES += cbor.cc
libircd_la_SOURCES += conf.cc

View file

@ -28,11 +28,9 @@ decltype(ircd::spirit::rule_buffer)
ircd::spirit::rule_buffer
alignas(64);
#ifndef __clang__
thread_local
decltype(ircd::spirit::generator_state)
ircd::spirit::generator_state;
#endif
thread_local
decltype(ircd::spirit::generator_buffer)