summaryrefslogtreecommitdiff
path: root/server.h
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2011-07-11 09:31:33 -0400
committerdwight <dwight@10gen.com>2011-07-11 09:31:33 -0400
commit984dc80a022f3e8f6a6187dbd75cd910fcb2b83e (patch)
tree9d83e3f787dc8f3adaaab1e4a1f19b02ef7b60cb /server.h
parent3021bbf4e23cef402f4b10c936994fd208af32ab (diff)
downloadmongo-984dc80a022f3e8f6a6187dbd75cd910fcb2b83e.tar.gz
prep for some compiler hinting in the future
Diffstat (limited to 'server.h')
-rw-r--r--server.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/server.h b/server.h
new file mode 100644
index 00000000000..066b87db989
--- /dev/null
+++ b/server.h
@@ -0,0 +1,23 @@
+/** @file server.h
+
+ This file contains includes commonly needed in the server files (mongod, mongos, test). It is NOT included in the C++ client.
+
+ Over time we should move more here, and more out of pch.h. And get rid of pch.h at some point.
+*/
+
+// todo is there a boost thign for this already?
+
+#pragma once
+
+#include "bson/inline_decls.h"
+
+/* Note: do not clutter code with these -- ONLY use in hot spots / significant loops. */
+
+// branch prediction. indicate we expect to enter the if statement body
+#define IF MONGOIF
+
+// branch prediction. indicate we expect to not enter the if statement body
+#define _IF MONGO_IF
+
+// prefetch data from memory
+#define PREFETCH MONGOPREFETCH