summaryrefslogtreecommitdiff
path: root/src/mongo/db/d_globals.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/d_globals.h')
-rw-r--r--src/mongo/db/d_globals.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/mongo/db/d_globals.h b/src/mongo/db/d_globals.h
new file mode 100644
index 00000000000..7c95d463cc3
--- /dev/null
+++ b/src/mongo/db/d_globals.h
@@ -0,0 +1,27 @@
+// @file d_globals.h
+//
+// these are global variables used in mongod ("d"). also used in test binary as that is effectively a variation on mongod code.
+// that is, these are not in mongos.
+//
+
+#pragma once
+
+namespace mongo {
+
+ class RWLock;
+ class MongoMutex;
+ class ClientCursorMonitor;
+
+ struct DGlobals : boost::noncopyable {
+ DGlobals();
+
+ // these are intentionally never deleted:
+ RWLock& writeExcluder;
+ MongoMutex &dbMutex;
+ ClientCursorMonitor& clientCursorMonitor;
+
+ };
+
+ extern DGlobals d;
+
+};