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

Side by Side Diff: third_party/WebKit/Source/platform/heap/SafePoint.h

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored Created 4 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium 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 SafePoint_h 5 #ifndef SafePoint_h
6 #define SafePoint_h 6 #define SafePoint_h
7 7
8 #include "platform/heap/ThreadState.h" 8 #include "platform/heap/ThreadState.h"
9 #include "wtf/ThreadingPrimitives.h" 9 #include "wtf/ThreadingPrimitives.h"
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 m_locked = false; 83 m_locked = false;
84 } 84 }
85 85
86 MutexBase& m_mutex; 86 MutexBase& m_mutex;
87 bool m_locked; 87 bool m_locked;
88 }; 88 };
89 89
90 class SafePointBarrier final { 90 class SafePointBarrier final {
91 WTF_MAKE_NONCOPYABLE(SafePointBarrier); 91 WTF_MAKE_NONCOPYABLE(SafePointBarrier);
92 public: 92 public:
93 SafePointBarrier(); 93 SafePointBarrier(MultiThreadGCGroup*);
haraken 2016/01/28 15:52:50 Add explicit.
keishi 2016/02/29 06:02:33 Done.
94 ~SafePointBarrier(); 94 ~SafePointBarrier();
95 95
96 // Request other attached threads that are not at safe points to park 96 // Request other attached threads that are not at safe points to park
97 // themselves on safepoints. 97 // themselves on safepoints.
98 bool parkOthers(); 98 bool parkOthers();
99 99
100 // Resume executions of other attached threads that are parked at 100 // Resume executions of other attached threads that are parked at
101 // the safe points. 101 // the safe points.
102 void resumeOthers(bool barrierLocked = false); 102 void resumeOthers(bool barrierLocked = false);
103 103
(...skipping 14 matching lines...) Expand all
118 static void enterSafePointAfterPushRegisters(SafePointBarrier* barrier, Thre adState* state, intptr_t* stackEnd) 118 static void enterSafePointAfterPushRegisters(SafePointBarrier* barrier, Thre adState* state, intptr_t* stackEnd)
119 { 119 {
120 barrier->doEnterSafePoint(state, stackEnd); 120 barrier->doEnterSafePoint(state, stackEnd);
121 } 121 }
122 122
123 volatile int m_canResume; 123 volatile int m_canResume;
124 volatile int m_unparkedThreadCount; 124 volatile int m_unparkedThreadCount;
125 Mutex m_mutex; 125 Mutex m_mutex;
126 ThreadCondition m_parked; 126 ThreadCondition m_parked;
127 ThreadCondition m_resume; 127 ThreadCondition m_resume;
128 MultiThreadGCGroup* m_gcGroup;
128 }; 129 };
129 130
130 } // namespace blink 131 } // namespace blink
131 132
132 #endif 133 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698