summaryrefslogtreecommitdiff
path: root/src/mongo/base/init.h
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2018-02-27 09:47:29 -0500
committerHenrik Edin <henrik.edin@mongodb.com>2018-03-12 10:57:28 -0400
commit0486c9ff50402c8680d14a495c2d9dfe543939a1 (patch)
treeae6959309757d62c055a2f6cecbc8532aba17400 /src/mongo/base/init.h
parentd7012b42d747b498dc06747240c79f576425bbc6 (diff)
downloadmongo-0486c9ff50402c8680d14a495c2d9dfe543939a1.tar.gz
SERVER-33629 Deinitialization support for MONGO_INITIALIZER. Done via the GlobalInitializerRegisterer instead of macros. Deinitialization executes in reverse order from initialization.
Diffstat (limited to 'src/mongo/base/init.h')
-rw-r--r--src/mongo/base/init.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/base/init.h b/src/mongo/base/init.h
index c68eb027e0f..5fc8aed2c86 100644
--- a/src/mongo/base/init.h
+++ b/src/mongo/base/init.h
@@ -61,7 +61,7 @@
/**
* Convenience parameter representing the default set of dependents for initializer functions.
*/
-#define MONGO_DEFAULT_PREREQUISITES ("default")
+#define MONGO_DEFAULT_PREREQUISITES (MONGO_DEFAULT_PREREQUISITES_STR)
/**
* Macro to define an initializer function named "NAME" with the default prerequisites, and
@@ -119,10 +119,10 @@
::mongo::Status _MONGO_INITIALIZER_FUNCTION_NAME(NAME)(::mongo::InitializerContext*); \
namespace { \
::mongo::GlobalInitializerRegisterer _mongoInitializerRegisterer_##NAME( \
- #NAME, \
- _MONGO_INITIALIZER_FUNCTION_NAME(NAME), \
+ std::string(#NAME), \
MONGO_MAKE_STRING_VECTOR PREREQUISITES, \
- MONGO_MAKE_STRING_VECTOR DEPENDENTS); \
+ MONGO_MAKE_STRING_VECTOR DEPENDENTS, \
+ mongo::InitializerFunction(_MONGO_INITIALIZER_FUNCTION_NAME(NAME))); \
} \
::mongo::Status _MONGO_INITIALIZER_FUNCTION_NAME(NAME)