diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-01 23:35:27 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-02 16:43:57 +0300 |
commit | f52b47eea4c5de553d202669f91e6f4f14668592 (patch) | |
tree | 1f7920725b5e878883caf570b233a72e42065f1b /libbuild2 | |
parent | 1e71bf440efb037a7aa2bafd679cf988129fad7b (diff) |
Add workaround for data race in libstdc++'s locale(const locale&, Facet*) constructor
Diffstat (limited to 'libbuild2')
-rw-r--r-- | libbuild2/module.hxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libbuild2/module.hxx b/libbuild2/module.hxx index 5fbed9c..7d94837 100644 --- a/libbuild2/module.hxx +++ b/libbuild2/module.hxx @@ -56,12 +56,18 @@ namespace build2 module_init_function* init; }; - // The register() function will be written in C++ and will be called from - // C++ but we need to suppress name mangling to be able to use dlsym() and - // equivalent. + // The build2_<modname>_load() function will be written in C++ and will be + // called from C++ but we need to suppress name mangling to be able to use + // dlsym() or equivalent. + // + // Note that the load() function is guaranteed to be called during serial + // execution (either from main() or during the load phase). + // + // @@ I wonder if returning a "C++ struct" (it contains pointer to functions + // with signatures containing C++ type) is kosher. // extern "C" - using module_register_function = module_functions (); + using module_load_function = module_functions (); // Loaded modules state. // |