Index: src/platform-win32.cc |
=================================================================== |
--- src/platform-win32.cc (revision 11012) |
+++ src/platform-win32.cc (working copy) |
@@ -208,13 +208,13 @@ |
#endif // _WIN64 |
-static Mutex* math_function_mutex = OS::CreateMutex(); |
+static LazyMutex math_function_mutex = LAZY_MUTEX_INITIALIZER; |
#define UNARY_MATH_FUNCTION(name, generator) \ |
static UnaryMathFunction fast_##name##_function = NULL; \ |
double fast_##name(double x) { \ |
if (fast_##name##_function == NULL) { \ |
- ScopedLock lock(math_function_mutex); \ |
+ ScopedLock lock(math_function_mutex.Pointer()); \ |
UnaryMathFunction temp = generator; \ |
MemoryBarrier(); \ |
fast_##name##_function = temp; \ |