| Index: src/platform.h
|
| diff --git a/src/platform.h b/src/platform.h
|
| index 4ec6057c5df01d563e39d3b8a07457d5bc8e8d96..3b2aa3c8bafdf7c2a11ce1190769ef9eeac168b6 100644
|
| --- a/src/platform.h
|
| +++ b/src/platform.h
|
| @@ -119,6 +119,10 @@ class OS {
|
| // Initializes the platform OS support. Called once at VM startup.
|
| static void SetUp();
|
|
|
| + // Initializes the platform OS support that depend on CPU features. This is
|
| + // called after CPU initialization.
|
| + static void PostSetUp();
|
| +
|
| // Returns the accumulated user time for thread. This routine
|
| // can be used for profiling. The implementation should
|
| // strive for high-precision timer resolution, preferable
|
| @@ -545,7 +549,8 @@ struct CreateMutexTrait {
|
| // // Do something.
|
| // }
|
| //
|
| -typedef LazyDynamicInstance<Mutex, CreateMutexTrait>::type LazyMutex;
|
| +typedef LazyDynamicInstance<
|
| + Mutex, CreateMutexTrait, ThreadSafeInitOnceTrait>::type LazyMutex;
|
|
|
| #define LAZY_MUTEX_INITIALIZER LAZY_DYNAMIC_INSTANCE_INITIALIZER
|
|
|
| @@ -616,7 +621,8 @@ struct CreateSemaphoreTrait {
|
| template <int InitialValue>
|
| struct LazySemaphore {
|
| typedef typename LazyDynamicInstance<
|
| - Semaphore, CreateSemaphoreTrait<InitialValue> >::type type;
|
| + Semaphore, CreateSemaphoreTrait<InitialValue>,
|
| + ThreadSafeInitOnceTrait>::type type;
|
| };
|
|
|
| #define LAZY_SEMAPHORE_INITIALIZER LAZY_DYNAMIC_INSTANCE_INITIALIZER
|
|
|