diff options
Diffstat (limited to 'deps/v8/src/platform.h')
-rw-r--r-- | deps/v8/src/platform.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/deps/v8/src/platform.h b/deps/v8/src/platform.h index 4ec6057c5d..168791a0a4 100644 --- a/deps/v8/src/platform.h +++ b/deps/v8/src/platform.h @@ -119,6 +119,13 @@ 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(); + + // Clean up platform-OS-related things. Called once at VM shutdown. + static void TearDown(); + // 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 +552,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 +624,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 |