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

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

Issue 1550563002: Blink Platform: Remove time functions from Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 #include "platform/heap/SafePoint.h" 5 #include "platform/heap/SafePoint.h"
6 6
7 #include "wtf/Atomics.h" 7 #include "wtf/Atomics.h"
8 #include "wtf/CurrentTime.h"
8 9
9 namespace blink { 10 namespace blink {
10 11
11 using PushAllRegistersCallback = void (*)(SafePointBarrier*, ThreadState*, intpt r_t*); 12 using PushAllRegistersCallback = void (*)(SafePointBarrier*, ThreadState*, intpt r_t*);
12 extern "C" void pushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegiste rsCallback); 13 extern "C" void pushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegiste rsCallback);
13 14
14 static double lockingTimeout() 15 static double lockingTimeout()
15 { 16 {
16 // Wait time for parking all threads is at most 100 ms. 17 // Wait time for parking all threads is at most 100 ms.
17 return 0.100; 18 return 0.100;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // If no other thread is waiting for other threads to park then 131 // If no other thread is waiting for other threads to park then
131 // this counter can be negative: if N threads are at safe-points 132 // this counter can be negative: if N threads are at safe-points
132 // the counter will be -N. 133 // the counter will be -N.
133 if (!atomicDecrement(&m_unparkedThreadCount)) { 134 if (!atomicDecrement(&m_unparkedThreadCount)) {
134 MutexLocker locker(m_mutex); 135 MutexLocker locker(m_mutex);
135 m_parked.signal(); // Safe point reached. 136 m_parked.signal(); // Safe point reached.
136 } 137 }
137 } 138 }
138 139
139 } // namespace blink 140 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698