[Avida-SVN] r3480 - branches/tcmalloc-1.4/source/platform/tcmalloc-1.4
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Wed Oct 14 13:25:08 PDT 2009
Author: brysonda
Date: 2009-10-14 16:25:07 -0400 (Wed, 14 Oct 2009)
New Revision: 3480
Modified:
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/atomicops-internals-x86.cc
Log:
Add missing initializer definition.
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/atomicops-internals-x86.cc
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/atomicops-internals-x86.cc 2009-10-14 20:17:36 UTC (rev 3479)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/atomicops-internals-x86.cc 2009-10-14 20:25:07 UTC (rev 3480)
@@ -138,6 +138,19 @@
AtomicOps_Internalx86CPUFeatures.has_cmpxchg16b = ((ecx >> 13) & 1);
}
+class GoogleInitializer {
+public:
+ typedef void (*void_function)(void);
+ GoogleInitializer(const char* name, void_function f) {
+ f();
+ }
+};
+
+#define REGISTER_MODULE_INITIALIZER(name,body) \
+static void google_init_module_##name () { body; } \
+GoogleInitializer google_initializer_module_##name(#name, \
+google_init_module_##name)
+
REGISTER_MODULE_INITIALIZER(atomicops_x86, {
AtomicOps_Internalx86CPUFeaturesInit();
});
More information about the Avida-cvs
mailing list