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

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

Issue 2703713003: Remove SafePointBarrier (Closed)
Patch Set: temp Created 3 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 14 matching lines...) Expand all
25 25
26 ~SafePointScope() { 26 ~SafePointScope() {
27 if (m_state) 27 if (m_state)
28 m_state->leaveSafePoint(); 28 m_state->leaveSafePoint();
29 } 29 }
30 30
31 private: 31 private:
32 ThreadState* m_state; 32 ThreadState* m_state;
33 }; 33 };
34 34
35 class SafePointBarrier final {
36 USING_FAST_MALLOC(SafePointBarrier);
37 WTF_MAKE_NONCOPYABLE(SafePointBarrier);
38
39 public:
40 SafePointBarrier();
41 ~SafePointBarrier();
42
43 void enterSafePoint(ThreadState*);
44 void leaveSafePoint();
45
46 private:
47 void doPark(ThreadState*, intptr_t* stackEnd);
48 void doEnterSafePoint(ThreadState*, intptr_t* stackEnd);
49 static void enterSafePointAfterPushRegisters(SafePointBarrier* barrier,
50 ThreadState* state,
51 intptr_t* stackEnd) {
52 barrier->doEnterSafePoint(state, stackEnd);
53 }
54 Mutex m_mutex;
55 };
56
57 } // namespace blink 35 } // namespace blink
58 36
59 #endif 37 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.cpp ('k') | third_party/WebKit/Source/platform/heap/SafePoint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698