Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: src/platform/condition-variable.h

Issue 316133002: Move atomic ops and related files to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform-win32.cc ('k') | src/platform/mutex.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PLATFORM_CONDITION_VARIABLE_H_ 5 #ifndef V8_PLATFORM_CONDITION_VARIABLE_H_
6 #define V8_PLATFORM_CONDITION_VARIABLE_H_ 6 #define V8_PLATFORM_CONDITION_VARIABLE_H_
7 7
8 #include "src/base/lazy-instance.h"
8 #include "src/platform/mutex.h" 9 #include "src/platform/mutex.h"
9 10
10 namespace v8 { 11 namespace v8 {
11 namespace internal { 12 namespace internal {
12 13
13 // Forward declarations. 14 // Forward declarations.
14 class ConditionVariableEvent; 15 class ConditionVariableEvent;
15 class TimeDelta; 16 class TimeDelta;
16 17
17 // ----------------------------------------------------------------------------- 18 // -----------------------------------------------------------------------------
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // POD ConditionVariable initialized lazily (i.e. the first time Pointer() is 100 // POD ConditionVariable initialized lazily (i.e. the first time Pointer() is
100 // called). 101 // called).
101 // Usage: 102 // Usage:
102 // static LazyConditionVariable my_condvar = 103 // static LazyConditionVariable my_condvar =
103 // LAZY_CONDITION_VARIABLE_INITIALIZER; 104 // LAZY_CONDITION_VARIABLE_INITIALIZER;
104 // 105 //
105 // void my_function() { 106 // void my_function() {
106 // LockGuard<Mutex> lock_guard(&my_mutex); 107 // LockGuard<Mutex> lock_guard(&my_mutex);
107 // my_condvar.Pointer()->Wait(&my_mutex); 108 // my_condvar.Pointer()->Wait(&my_mutex);
108 // } 109 // }
109 typedef LazyStaticInstance<ConditionVariable, 110 typedef base::LazyStaticInstance<
110 DefaultConstructTrait<ConditionVariable>, 111 ConditionVariable, base::DefaultConstructTrait<ConditionVariable>,
111 ThreadSafeInitOnceTrait>::type LazyConditionVariable; 112 base::ThreadSafeInitOnceTrait>::type LazyConditionVariable;
112 113
113 #define LAZY_CONDITION_VARIABLE_INITIALIZER LAZY_STATIC_INSTANCE_INITIALIZER 114 #define LAZY_CONDITION_VARIABLE_INITIALIZER LAZY_STATIC_INSTANCE_INITIALIZER
114 115
115 } } // namespace v8::internal 116 } } // namespace v8::internal
116 117
117 #endif // V8_PLATFORM_CONDITION_VARIABLE_H_ 118 #endif // V8_PLATFORM_CONDITION_VARIABLE_H_
OLDNEW
« no previous file with comments | « src/platform-win32.cc ('k') | src/platform/mutex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698