v8  8.6.395 (node 15.0.1)
V8 is Google's open source JavaScript engine
process-heap.h
Go to the documentation of this file.
1 // Copyright 2020 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef INCLUDE_CPPGC_INTERNAL_PROCESS_HEAP_H_
6 #define INCLUDE_CPPGC_INTERNAL_PROCESS_HEAP_H_
7 
8 #include "cppgc/internal/atomic-entry-flag.h"
9 #include "v8config.h" // NOLINT(build/include_directory)
10 
11 namespace cppgc {
12 namespace internal {
13 
14 class V8_EXPORT ProcessHeap final {
15  public:
17  concurrent_marking_flag_.Enter();
18  }
20  concurrent_marking_flag_.Exit();
21  }
22 
24  return concurrent_marking_flag_.MightBeEntered();
25  }
26 
27  private:
28  static AtomicEntryFlag concurrent_marking_flag_;
29 };
30 
31 } // namespace internal
32 } // namespace cppgc
33 
34 #endif // INCLUDE_CPPGC_INTERNAL_PROCESS_HEAP_H_